A formal investigation has been launched after a solider shot dead four colleagues on Wednesday before taking his own life, the Nigerian Army said.
Two other soldiers were injured in the incident at a military base in Borno state and were taken to a military hospital in Maiduguri for treatment, Army spokesman Sagir Musa added.
Borno state is one of the areas worst affected by the decade-long insurgency waged by Islamists in north-eastern Nigeria.
Last year a retired officer who now specialises in mental health said many soldiers fighting Boko Haram militants were “suffering mental illness in silence”.