He will attend the summit hosted by Germany on July 7-8.
The theme of the summit this year is 'Shaping an Inter- connected World'.
"PM @narendramodi reaches Hamburg for the G20 Summit. Key multilateral and bilateral engagements will take place through the summit," the Prime Minister's Office tweeted.
On the sidelines of the summit, Modi is to participate in a meeting of leaders of the BRICS - Brazil, Russia, India, China and South Africa - grouping tomorrow. He is also set to hold bilateral meetings with some of the world leaders there.
The G20, founded in 1999, comprises a mix of the world's largest and emerging economies, representing about two-thirds of the world's population, 85 per cent of global gross domestic product and over 75 per cent of global trade.
The members are Argentina, Australia, Brazil, Canada, China, France, Germany, India, Indonesia, Italy, Japan, South Korea, Mexico, Russia, Saudi Arabia, South Africa, Turkey, the UK, the US, and the European Union.