China invited Modi to the Asia-Pacific Economic Cooperation (APEC) meeting in November.
An official statement said that both India and China "emphasized on the need to find a solution to the boundary question. The prime minister stressed the importance of strengthening mutual trust and confidence, and maintaining peace and tranquility on the border".
Had a very fruitful meeting with Chinese President Mr. Xi Jinping. We discussed a wide range of issues pic.twitter.com/dL6n0p17TO— Narendra Modi (@narendramodi) July 15, 2014
"If India and China could amicably resolve the boundary question, it would set an example for the entire world, on peaceful conflict resolution," the statement quoted Modi as telling Xi.
Modi is in Brazil to attend the sixth BRICS Summit. The meeting which lasted for 80 minutes is the first summit-level interaction with China.
BRICS is a group developing economies Brazil, Russia, India, China and South Africa have created hy coming together to have a greater global say.
Earlier Tuesday, Modi tweeted that he had a fruitful discussion with the Chinese President.
"Had a very fruitful meeting with Chinese President (Mr) Xi Jinping. We discussed a wide range of issues," Modi said in the tweet.
Modi also suggested the addition of one more route for the Kailash-Mansarovar Yatra, keeping in view the terrain difficulties.
Xi "accepted this as a suggestion for consideration", added the statement.
Inviting the prime minister for the APEC meeting, Xi said: "India should deepen its engagement with the Shanghai Cooperation Organisation (SCO)."
The prime minister said India currently has observer status in the SCO, and was ready to accept additional responsibility, if asked to.
Modi also called for enhanced Chinese investment in the infrastructure sector in India, and hoped that the trade imbalance between the two countries is resolved.
Xi agreed that balance in trade is necessary for a sustainable economic relationship, the statement said and added that "enhanced services exports from India to China could be one way to address the issue".
The two leaders observed that India and China have enormous opportunities to not only forge mutually beneficial partnerships, but also serve as catalytic agents of Asian and global prosperity.
Underscoring the importance of the bilateral relationship, Xi said: "When India and China meet, the whole world watches."
Modi has also expressed hope that Xi's planned visit to India this year would be an opportunity to chart a new and ambitious agenda for the strategic partnership between the two nations.