Sometimes you get people on your project that are a danger to themselves, let alone anyone else or your project. On occasion, they are actually OK in terms of their knowledge of the subject matter, but you wouldn’t trust them to deliver newspapers.
If this is the case, you may wish to assing them an ‘advisory’ or ‘consulting’ role without any real delivery responsibility. They could maybe coach some of the more junior people in your team in their area of expertise. If you sell it correctly, there’s a good chance they will be happy in the respect you have in their knowledge.
That way you get the benefit of their knowledge without the associated failure to deliver; just make sure you give them some boundaries and keep a close eye on them.