"The soldier who opened fire was also wounded during the response from Isaf soldiers and the Afghan army who were at the scene. He was arrested immediately and is now under observation in the camp hospital."
The pair of Italian soldiers suffered only minor injuries and have returned to duty, an Italian military spokesman said.
An Isaf spokesman said it was not clear whether the incident occured by accident or with intent.
The Afghan soldier is from an area north of Kabul, the capital, and is thought to have mental problems.
In November, an Afghan policeman killed five British soldiers in the south of the country.
The Taliban later claimed responsibility for the attack.
Barack Obama, the US president, has committed to increasing troop numbers in Afghanistan, with an emphasis on training local security forces.
Italy is one of more than 40 Nato countries with soldiers in Afghanistan to fight with Afghan forces against the Taliban and al-Qaeda.
Nato has been in Afghanistan following the US and UK's invasion of the country in 2001, to remove the Taliban, accused of harbouring al-Qaeda operatives, from power.