He was born in Tuhala, Estonia. He visited Riga in 1782. Mellin, a soldier in the Imperial Russian Army, became a cartographer at the request of Paul I of Russia, who wanted to see a map of Livonia. Since a professional map did not exist, Mellin was put in charge of creating it. In 1798, the Atlas von Liefland, oder von den beyden Gouvernementern u. Herzogthümern Lief- und Ehstland, und der Provinz Oesel, was published by Mellin. It took 28 years to complete it. Mellin used maps from private collections, the military, and the Russian Academy of Sciences. The map shows natural features such as islands, geology and shorelines of the region. The maps were so popular they were sold overseas. At one point, Mellin was accused of espionage because of where the maps were being sold. He was arrested. Paul I had the maps pulled off the market.