Following the two-day summit, G20 leaders committed to keep markets open, focus on reciprocity and nondiscrimination, fight protectionism, unfair trade practices.
"Goodbye Hamburg! PM emplanes for Delhi after a successful visit to Israel and G20 Summit," External Affairs Ministry spokesperson Gopal Baglay tweeted.
PM Modi had flown to Hamburg from Tel Aviv, Israel, on July 7 in what was the first visit of an Indian prime minister to the Jewish nation.
On the sidelines of the G20 Summit, Modi participated in an informal meeting with other BRICS leaders from Brazil, Russia, China and South Africa.
He also held an informal conversation with Chinese President Xi Jinping on "a range of issues" yesterday, amid a standoff between the armies of India and China in Sikkim sector.
For bilateral meetings, PM Modi met several world leaders, including British Prime Minister Theresa May, South Korean President Moon Jae-in and Italy's Prime Minister Paolo Gentiloni.
PM Modi separately met Vietnamese counterpart Nguyen Xuan Phuc.
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.