The protestors denounced the reprinting of a cartoon of the Prophet Muhammad in Danish newspapers and the forthcoming release of a film on the Koran by a right-wing Dutch politician.
RFE/RL's Radio Free Afghanistan reports that the marchers on the highway burned Danish and Dutch flags and chanted: "Death to Denmark and the Netherlands."
The cartoon, which depicted Prophet Muhammad wearing a bomb-shaped turban, was one of 12 that prompted bloody riots in many Muslim countries in 2006. It was republished by a number of Danish papers last month to show solidarity with the cartoonist after three men were arrested on suspicion of plotting to kill him.
Meanwhile, a Dutch lawmaker, Geert Wilders, is expected to release a film, thought to be critical of the Koran, later this month.
"We call on the Afghan government to cut diplomatic relations with Denmark and the Netherlands. Dutch and Danish forces should be expelled from Afghanistan. Based on Islamic brotherhood, we urge all Muslims across the world to boycott Danish and Dutch goods," one of the demonstrators in Nangarhar province said, reading from a prepared statement.
The Afghan government has called the reprinting of the Danish cartoon an attack against Islam amid concern it could swell the ranks of Islamic militants. The Taliban has said Wilders film and the reprinting of the cartoon are part of a "Crusader war" against Muslims.
On March 8 several thousand people marched in the western city of Herat and shouted angry slogans against Denmark and the Netherlands.
One of the protesters, Mohammad Akbar, warned those who insult Islam.
"We would call a Jihad against anyone who insults our prophet, anyone who insults our leader. And we would demonstrate against him," Akbar said.
Similar protests were held in other parts of the country the previous week, including the capital, Kabul, where on March 4 about 200 lawmakers urged the Danish and Dutch governments to prevent what they said was blasphemy against Islam.
Afghanistan is an Islamic republic where criticism of Prophet Muhammad and the Koran can carry the death sentence.
The Netherlands has about 1,500 troops deployed in Afghanistan as part of a NATO-led peace-keeping mission, while Denmark has more than 600.
(RFE/RL's Radio Free Afghanistan contributed to this report)