China denounced the visit, saying Mr Koizumi was paying his respects to war criminals, while a group of South Korean nationalists chopped off the tips of their little fingers in protest.
It is the first time in 16 years that a serving Japanese prime minister has made an official visit to the Yasukuni shrine, which is seen by Japan's Asian neighbours as a symbol of Japan's military aggression.
The Chinese foreign ministry said it felt "strong indignation" over the visit.
"This erroneous act has damaged the political foundation of Sino-Japanese relations as well as the feelings of the Chinese people and other Asian victims," the official Chinese news agency Xinhua quoted Chinese Deputy Foreign Minister Wang Yi as saying.
Rhetoric
A BBC correspondent in Beijing, Adam Brookes, says China routinely accuses Japan of failing to come to terms with its record of atrocities during its wartime occupation of other Asian countries.
However, our correspondent adds that China's reaction lacked the shrill language that sometimes characterises Chinese remarks on the issue of Japan's war record.
Nevertheless, the visit has cast a shadow over a planned trip by Mr Koizumi to China in October.
The South Korean Government also voiced its disappointment at Mr Koizumi's visit.
A South Korean foreign ministry statement said: "We cannot but express regret over the fact the Japanese prime minister paid respect to war criminals who obstructed world peace and caused unspeakable damage to neighbouring countries."
Bowing to international pressure, Mr Koizumi brought his visit forward by two days because of regional sensitivities surrounding the original date planned to coincide with the anniversary of Japan's surrender to Allied forces.
Speaking after visiting the memorial, Mr Koizumi said he expressed his "deepest regret and remorse toward all of the victims of war".
Public support
Our correspondent said Mr Koizumi was greeted by a large crowd of well-wishers who had gathered outside the shrine.
As he entered the building there were cheers and shouts of "banzai". Many waved paper flags of the rising sun, which were handed out by right-wing groups.
Yasukuni, a Shinto shrine, honours 2.5 million Japanese soldiers, including convicted war criminals such as former Prime Minister Hideki Tojo, who was executed after World War II.
At least four of Mr Koizumi's 17 cabinet ministers plan to go pay their respects at the shrine on the anniversary.
The Japanese public appeared to support Mr Koizumi's original plan to visit the shrine on the anniversary itself.
A survey conducted over the weekend by the NTV television network showed that nearly 50% of those polled thought Mr Koizumi should visit the shrine on Wednesday.
Less than 40%, according to the poll results announced Monday, opposed his visiting on the anniversary.