The two leaders, who arrived almost at the same time here last evening for attending the BRICS summit, engaged shortly thereafter for what was described as "good discussions and good meeting".
The meeting was scheduled for 40 minutes but it went on for 80 as it was freewheeling discussion without any constraints.
The two leaders appeared well prepared for the meeting as both of them referred to the statements made by the other before they assumed power, Spokesperson Syed Akbaruddin said.
President Xi in particular referred to Modi's experience in Gujarat as Chief Minister and his focus on development.
Also Read
The discussions centred around all aspects of the bilateral relations, regional and international matters, he said.
The surprise invitation for the APEC summit as part of partnership and engagement came in the context of the two leaders discussing the need for the two countries to work together in international fora like BRICS and other fora.
Today's meeting was the fourth high-level engagement between the two countries since the Modi government assumed charge six weeks ago.
Xi acknowledged his visit to India in September and extended an invitation to Modi to visit China, which was accepted.
The dates will be decided by diplomatic channels, he said.
Asked if India has accepted the invitation for the APEC summit, Akbaruddin said November was a busy month with SAARC and G 20 meetings scheduled but New Delhi considers the invitation as a significant gesture which will be given very serious consideration.