Doval's visit was on the invitation of his Russian counterpart Nikolai Patrushev.
During the talks, the two sides covered the preparations for Modi's visit to Vladivostok as chief guest at the Eastern Economic Forum in early September and for the next India-Russia Bilateral Summit.
"The discussions, based on mutual trust and confidence, showed identical or close positions on various issues characteristic of the special and privileged strategic partnership between the two countries," a Ministry of External Affairs statement said.
"Both sides reaffirmed their intention to intensify counter-terrorism cooperation. The longstanding position of both sides on importance of their bilateral consultations and mutual support for principles of sovereignty and territorial integrity and non-interference of third parties was reiterated," the statement said.
Doval's visit comes days after Russia backed India's moves on Jammu and Kashmir, saying that the changes are within the framework of the Indian Constitution, even as it urged India and Pakistan to maintain peace.
Moscow said that the "change in the status of the state of Jammu and Kashmir and its division into two union territories are carried out within the framework of the Constitution of the Republic of India".
Ahead of Doval's visit to prepare for the PM's visit, on July 22 Indian External Affairs Minister S Jaishankar and Russian Deputy Prime Minister Yury Borisov had met in New Delhi for the India-Russia Intergovernmental Commission on Trade, Economic, Scientific, Technological and Cultural Cooperation (IRIGC-TEC).
The Russian Deputy Prime Minister Borisov was in India at the head of an 18-member strong Russian delegation, representing various Ministries.
During that meeting, both sides agreed to take measures to boost trade, including expediting negotiations on a Trade Agreement between India and the Eurasian Economic Union.
The India-Russia statement reiterating "mutual support for principles of sovereignty and territorial integrity and non-interference of third parties" also has its throwback to Crimea, and India's position of non-interference, in 2014 when the western world was baying for Russia's blood.
In 2014, then National Security Adviser Shivshankar Menon had, to a question on India's position on Crimea, after it decided to join the Russian union, said: "We hope that whatever internal issues there are within Ukraine are settled peacefully, and the broader issues of reconciling various interests involved, and there are legitimate Russian and other interests involveda. We hope those are discussed, negotiated and that there is a satisfactory resolution to them."
The statement was made on the same day that Crimea's parliament voted to hold a referendum for secession from Ukraine.
On Wednesday, Doval also met the Director of ROSCOSMOS Dmitry Rogozin to review ongoing cooperation in the space field and the Gaganyaan programme. Rogozin applauded the progress of India's Chandrayaan programme and conveyed Russia's support and best wishes for the mission's success.
Both sides also discussed long-term aspects of space cooperation, which is expected to figure prominently in the Bilateral summit in Vladivostok, it said.
( With inputs from IANS )