About 4,000 six year olds, dressed in white robes of the kind worn by pilgrims and carrying green bags, participated in the "Little Hajj" event in a field outside the capital Kuala Lumpur.
The Kaaba is a square building covered in a veil located in Mecca, Saudi Arabia, and is the holiest shrine in Islam. Part of the hajj involves walking round the Kaaba.
Khairizah Kamaruddin, spokeswoman for the organisers, said the event was aimed at getting youngsters ready to perform the annual hajj at a future date.
"The children were so excited, they are now looking forward to conducting the actual hajj pilgrimage."
More From This Section
The children taking part in the "Little Hajj" also threw pebbles at a wall during a practice version of the "stoning of the devil", another of the hajj rituals.
Predominantly Muslim Malaysia sends some 27,000 pilgrims to perform the hajj every year.
The hajj is one of the five pillars of Islam, which capable Muslims must perform at least once, and marks the spiritual peak of their lives.