BERLIN—Germany’s security agencies are investigating their own ranks for suspected plots to attack immigrants and politicians, as authorities have become increasingly concerned about allegations of extreme-right radicalism among some soldiers and police officers.

The probes examine a range of activities, from racist discussions in online chat forums and illegal weapons possession, to suspected hit lists of left-wing politicians and liberal activists, according to confidential documents and people familiar with the investigations....