We present to your attention the real story of how Nakhijevan ended up in Azerbaijan.
The map below shows the Yerevan (Erivan) governorate with its seven counties. This Yerevan was part of the Russian Empire. When Eastern Armenia was incorporated into the Russian Empire in 1828, a separate administrative national unit was created under the name “Armenian Region”. Naturally, Nakhijevan was also part of the Armenian Region.
In 1849, the Yerevan province was formed in the same territory and existed until the October Revolution of 1917. After that, Nakhijevan was [temporarily] part of independent Armenia.
On January 19, 1920, the Supreme Council of the Entente (a prototype of the current EU) officially recognized the independence of the First Republic of Armenia in its territories. The state borders of Armenia at that time, both de facto and de jure, included the entire Yerevan province (including Nakhijevan, Sharur-Daralagyaz, and Surmalu-Igdir districts) and the Kars region – a total area of about 60 thousand square kilometers.
In the fall of 1920, as a result of the rapprochement between Bolshevik Russia and Kemalist Turkey, the territory of independent Armenia was occupied and divided into zones of influence of Russia and Turkey.
In March 1921, on the basis of the Russian-Turkish agreement on brotherhood concluded in Moscow, Nakhijevan unexpectedly came under the protectorate of Azerbaijan. And this happened despite the agreement of December 2, 1920, concluded between the governments of the Republic of Armenia and Soviet Russia, in which it was noted that the former Yerevan governorate would fully become an integral part of the newly established Soviet Armenia.
It should be specially noted that there are no signatures of either the Armenian side or the Azerbaijani side under the Moscow Treaty. It turns out that the parties to the agreement, namely the Russian and Turkish, entered into an agreement covering third and fourth parties, which is a violation of the basic provisions of international law. Therefore, this agreement cannot be considered valid.
The only paper signed by the Armenian side was the Treaty of Kars, signed in October 1921 by Bolsheviks Askanaz Mravyan and Poghos Makintsyan. However, as far as we know, the Treaty of Kars was ratified only by the government of Soviet Russia in March 1922. That is, it was ratified for the governments of Armenia and Azerbaijan, which was also an absolute violation of international law.
During the preparation of the Treaty of Kars, the Turkish side made attempts to interfere in the process. Namely, it demanded that a separate agreement on the final clarification of the borders of Nakhijevan be signed between Armenia and Azerbaijan.
The Armenian and Azerbaijani sides made a joint statement, noting that such an agreement would be signed later as a result of future negotiations. However, this did not happen. And in fact, no agreement was signed between Armenia and Azerbaijan regarding the clarification of the borders of Nakhijevan.
With all that, if you carefully look at the presented map, it is clearly seen that the southern part of the Sharur-Daralyagyaz district was also included in the Nakhichevan Autonomous Republic founded in February 1924, which subsequently allowed Turkey to gain a border with Nakhijevan by exchanging territories with Iran.