The Treaty of Mozhaysk (also Moshaisk or other transliterations of Можайск) was a Danish-Russian treaty concluded on 7 August 1562, during the Livonian War. While not an actual alliance, the treaty confirmed the amicable Dano-Russian relation and obliged the parties to not support the other parties in the war, to respect each other's claims in Old Livonia, and to grant free passage to each other's merchants.
By 1562, Frederick II of Denmark and Ivan IV of Russia were two of several parties claiming superiority rights in Livonia, none of whom was able to decide the conflict for themselves. Instead of engaging in open war, Frederick II and Ivan IV preferred to uphold the long tradition of amicable Dano-Russian relations. The treaty has been noted for the circumstances that a European great power met the Russian tsardom on equal footing, and that no prior military decision forced the parties to conclude it.
In practice, the treaty was not wholly implemented. This was in part due to Frederick II's limited engagement in Livonia, where his brother Magnus pursued his own policies. In the subsequent war years, while not antagonizing Frederick II, Ivan IV would deal with Magnus directly, eventually making him king of Livonia as his vassal.
In 1562, during the early stage of the Livonian War, the territory of the present-day states Estonia and Latvia (then Terra Mariana or Old Livonia) was contested between Sigismund II Augustus of Poland–Lithuania, Ivan IV "The Terrible", tsar of Russia, Frederick II of Denmark-Norway and Erik XIV of Sweden. The Livonian Confederation had turned to Poland-Lithuania for protection in the 1557 Treaty of Pozvol, provoking the intervention of Ivan IV who, despite significant territorial gains and the important victory at Ermes (Ergeme), was unable to subordinate all Livonia. The bulk of the disintegrating Livonian Confederation was subordinated to Poland-Lithuania in the Treaty of Vilnius (1561), forming the duchies of Livonia and Courland and Semigallia. With Reval (Tallinn) accepting Swedish superiority, also in 1561, Sweden had established a dominon in Estonia despite the protests of Frederick II, who claimed historical rights on the area and had already purchased the Bishopric of Ösel–Wiek in western Estonia.