The geopolitical position of countries is constantly evolving under the influence of various factors such as war, revolution and change in the balance of power. Iran and Azerbaijan have been countries that their relations have changed greatly over the past three decades. They are located next to each other and have a special position. This special situation throughout history has caused rivalries and tensions in their relationships. But in addition, their ethnic, religious, historical and economic commonalities can be mentioned as a potential for cooperation. This article uses a descriptive-analytical method to understand the geopolitical relations of the Republic of Azerbaijan with Iran in the fields of competition, tension and cooperation. Azerbaijan is located in a region that due to its geographical features and proximity to Iran has always been considered by world powers and its geopolitical study can be useful in making political, economic, cultural and military decisions of our country and useful to reduce possible future conflicts. Considering the geopolitics of the two countries, The results show that areas such as the Aras River, the transfer of Azerbaijani oil to world markets, the Nagorno-Karabakh crisis, Azerbaijan's relations with the United States and the Zionist regime, hostile and provocative actions against Iran's national security have led to tensions and rivalry between the two countries. In contrast to the geopolitical entanglement of the two countries, the appropriate capacity for geo-economic cooperation, the geopolitical bottleneck of Azerbaijan, geographical coherence and proximity, cultural, social and religious interactions have provided the basis for cooperation between the two countries. Finally, the model of geopolitical relations between the two countries and suggestions for the development of interactions between the two countries are presented.