About 220 soldiers arrived in Kuwait on military transport planes.
A total of 600 non-combat troops had been working on reconstruction projects in southern Iraq since February 2004, protected by UK and Australian forces.
The decision was unpopular with the Japanese public, many of whom said it violated Japan's pacifist constitution.
"Our ground forces have bravely completed their mission and have now safely withdrawn to Kuwait," Japanese Prime Minister Junichiro Koizumi told reporters in Russia, after the G8 summit.
"We carried out our humanitarian and reconstruction tasks without firing a single shot - in fact, without pointing a gun at anyone."
The soldiers were greeted in Kuwait by Japan's defence chief Fukushiro Nukaga. They are due to return to Japan in about a week, according to the Associated Press.
The Japanese constitution, drafted by the US in 1947, bans the use of force to settle international disputes. The troops in Iraq were therefore engaged in work such as repairing buildings and providing medical training, rather than direct combat.
The decision to withdraw was prompted by plans for the UK and Australia to hand over responsibility for security in the area around the Japanese base at Samawa to Iraqi forces.
No Japanese soldiers were killed or wounded in Iraq, but Mr Koizumi faced a political crisis in 2004 when three aid workers were taken hostage by insurgents, who demanded that Japanese troops withdraw.
The three were eventually released unharmed, but another five Japanese citizens have been killed by militants.
Japan has gradually been expanding its role on the international stage in recent years.
It deployed nearly 1,000 troops to Indonesia to help with humanitarian aid following the December 2004 tsunami.
BBCLast Mod: 20 Eylül 2018, 18:16