He also asserted that India will implement the accord in "letter and spirit".
PM Modi, while speaking at the meeting of BRICS leaders on the sidelines of the G20 Summit, said that on issues of climate change and terror, the role of BRICS (Brazil, Russia, India, China and South Africa) is "important".
"It is mandatory to implement the consensus reached at the Paris agreement. India will implement the agreement in letter and spirit," Prime Minister Modi said.
The comments come after President Donald Trump recently announced that the US will withdraw from the Paris climate accord, saying the deal agreed by more than 190 nations unfairly benefited countries like India and China.
Donald Trump's decision had drawn sharp criticism from international leaders, business groups and green activists.
Mr Trump was also present in Hamburg to take part in the G20 Summit.
Later, on twitter, the Prime Minister said, "On issues like climate change and terror, the role of BRICS is important".
The objective of the Paris Agreement is to prevent an increase in global average temperature and keep it well below 2 degree Celsius.
The Agreement was adopted on December 12, 2015, by 195 parties to the United Nations Framework Convention on Climate Change (UNFCCC), replacing its predecessor Kyoto Protocol.
It was finally ratified on November 4, 2016.
The Prime Minister also said, "It will be our common endeavour to establish the BRICS rating agency at the earliest."