Its construction in a flashpoint town in northern India has been a campaign pledge of Modi's Hindu-nationalist Bharatiya Janata Party since the 1980s.
The Supreme Court ruled in November that a temple could be built in Ayodhya, where Hindu zealots demolished a 460-year-old mosque in 1992.
The ceremony will take place on August 5, which is also the first anniversary of India's controversial revocation of Muslim-majority Kashmir's semi-autonomy.
Modi is expected to lay a silver brick weighing 40 kilos (88 pounds), according to local media.
Holy water from the Ganges river and sacred soil taken from four main Hindu shrines will be used in the rituals.
The Indian leader's visit was confirmed by Vishwa Hindu Parishad (World Hindu Council) which led the campaign to build the temple.
"PM Modi is coming for the ceremony on August 5," VHP spokesman Vinod Bansal told AFP. "There is huge excitement among all our members."
With restrictions on large gatherings in place to curb the spread of coronavirus, only about 200 people will attend the ceremony, Bansal said.
Giant screens near the site will beam the ceremony live for devout Hindus so "they don't miss the golden moment", he added.
Residents of Ayodhya have been asked to light earthen lamps to celebrate the "historic" occasion.
The new temple would use about 170,000 cubic feet of stone and will be 38 metres (125 feet) tall and 81 metres long.
It will have its own shed for cows -- considered by Hindus to be sacred -- as well as a huge prayer hall.
Hindus say the site is the birthplace of Lord Ram, one of their most revered deities, and that the mosque torn down in 1992 was constructed over a Hindu temple.
The destruction of the mosque triggered religious riots in which about 2,000 people, most of them Muslims, were killed across the country.
It also led to a series of court battles with various groups staking claim to the three-acre site, before the Supreme Court's decision last year.
The court said a trust must be set up to oversee the construction of a temple and that a separate piece of land in Ayodhya would be given to a Muslim group to build a "prominent" new mosque.