Relations between Afghanistan and Tajikistan began in 1992. Afghanistan maintains an embassy in Dushanbe and a consulate in Khorugh. The current Afghanistan ambassador to Tajikistan is LTG. Mohammad Zahir Aghbar. Tajikistan maintains an embassy in Kabul and a consulate in Mazari Sharif, Faizabad and Kunduz. The current Tajikistan ambassador to Afghanistan is Sharofiddin Imom.
 The areas which form the two countries were once connected, especially during the Samanid, Ghaznavid, and Timurid periods. After a friendship treaty in 1750 between Ahmad Shah Durrani of Afghanistan and Mohammad Murad Beg of Bukhara, the Amu Darya (Oxus River) became the official border of Afghanistan. Persian language is widely used in both countries, and there are slightly more Tajiks in Afghanistan than in Tajikistan.
 Diplomatic relations between the two countries were established on June 15, 1992. The outbreak of the Tajikistani Civil War complicated matters as most of Tajikistan's southern border region (Khatlon and Gorno-Badakhshan) was contested between Tajik government forces (and allied Russian border guards) and the United Tajik Opposition, which was supported by forces of the Islamic State of Afghanistan. During 1992, at least 80,000 Tajikistanis sought refuge in Afghanistan. The Tajik opposition leaders enjoyed the support of the Afghan government and based themselves there, mainly Badakhshan Province. The civil war in Afghanistan had likewise caused refugee migration between the two countries, this time refugees from Afghanistan entering Tajikistan.
 Tajikistan opened its embassy in Kabul when the Karzai administration took control of Afghanistan. The consulate in Mazari Sharif was also opened in November of that year. Presidents Emomalii Rahmon of Tajikistan and Hamid Karzai of Afghanistan meet on the sidelines of the 2004 Economic Cooperation Organization summit held in Dushanbe. In April 2005 Rahmon made an official visit to Afghanistan. Diplomatic, business and cultural ties between the two countries have been expanding ever since. There are approximately 6,500 Afghans in Tajikistan. Of these, about 500 are studying in different universities in Tajikistan.
 Afghanistan and Tajikistan share a roughly 1,300-kilometer (810 mi) border, most of which is in rugged terrain and is poorly protected. Currently the porous border between the two countries is a major concern for both governments, as well as the international community. The border is a major route for drugs being smuggled from Afghanistan to Russia and Europe, and as of mid-2009 it appears that drug and insurgent-related violence around the border is increasing, due in part to the increasingly unstable situation in Pakistan.
 Transportation links between the two countries, such as the Afghanistan-Tajikistan Bridge, are slowly being rebuilt, often with help and financing from external governments.
 Several agreements have been signed between Afghanistan and Tajikistan concerning energy. A $500 million deal was signed in September 2007 to create an energy connection from Tajikistan and Kyrgyzstan to Afghanistan. Both Tajikistan and Kyrgyzstan are trying to develop their potentially vast hydroelectric industry by selling it to South Asia, and an energy link with Afghanistan is seen as the first step in such expansion.
 The two governments have also agreed to construct a 1,000-megawatt hydroelectric plant on the Panj River. Its construction is funded by the World Bank, the Asian Development Bank, the Islamic Development Bank.
 The President of Afghanistan and some of his officials had to leave Kabul after the Taliban took over the city on 15 August 2021. The Taliban had been defeating government forces in many parts of the country over the last few months. After a few days in Tajikistan, they moved to Oman and then the UAE.