"Dr. Nakamura's driver and four of his bodyguards were killed in the shooting", he said, adding that "Nakamura has been transferred to a hospital and he is now being treated".
He underwent surgery at a local hospital but died shortly after while being airlifted to the Bagram airfield hospital in the capital, Kabul, for further treatment, Gulzada Sanger, a hospital spokesman, told the Associated Press news agency.
In 2003 Nakamura, a native of the southwestern Japanese city of Fukuoka, won the Philippines' Ramon Magsaysay Award for peace and worldwide understanding - often called Asia's Nobel Prize.
Japanese Prime Minister Shinzo Abe said he was "shocked" by Nakamura's death, while the Afghan presidential office deplored the killing of "one of Afghanistan's greatest friends".
Afghan President Ashraf Ghani awarded him honorary Afghan citizenship in April.
Mitsuji Fukumoto, an official with Nakamura's organisation, told reporters in Tokyo the motive for the attack was unclear.
He came to Afghanistan after a Japanese colleague, Kazuya Ito, was abducted and killed.
Nakamura had also heavily been involved in the construction of wells and irrigation in villages where many suffered from cholera and other diseases due to a lack of clean water.
Ghani's spokesman, Sediq Sediqqi, said it was a "heinous" attack against a man who "dedicated all his life to change the lives of Afghans, worked on water management, dams, and improvement of traditional agriculture in Afghanistan".
Hundreds of Afghans posted photographs of Nakamura on their social media pages, condemning the killing and underscoring how respected the Japanese physician was.
The attack comes as humanitarian groups are on high alert just days after an aid worker for the United Nations was killed in a bombing in Kabul.
Nakamura was famous in Japan for his aid work, which dates back decades.
The Taliban denied responsibility for the attack, saying they have "good relations" with organisations that "contribute to the reconstruction of Afghanistan".
Nangarhar was once a hotbed of activity for the Islamic State group's Afghanistan affiliate.
Nangarhar police said they were searching for the attackers, who fled the scene, and that an investigation was underway.
Aid agencies and non-governmental groups have been targeted in Afghanistan's almost 20-years-long war. Nine people were killed in that attack.
Mr Nakamura devoted 35 years of his life to healing Afghans and Pakistanis.
Often seen sporting Pashtun dress, the 73-year-old native of the southern city of Fukuoka headed to Peshawar in northwest Pakistan in 1984 to treat leprosy in Pakistanis and sick Afghan refugees.