He was born in Radeln, Transylvania (nowadays Roadeş, part of Buneşti commune, Romania) in 1729 and joined the Austrian army at age 17. He served in the Seven Years' War as aide de camp for Leopold Josef Graf Daun. He was promoted to colonel in 1781. He fought on the lower Rhine in 1794 and the middle Rhine in 1795.
He later led the Austrian army in Italy during Napoleon Bonaparte's campaigns in Italy, part of the War of the Second Coalition. Serving under Russian field marshal Alexander Suvorov, who commanded Second Coalition forces, he commanded Austrian forces in victories at the battles of Cassano, Trebbia, Novi, and the Siege of Genoa, and came near another victory over Napoleon at the Battle of Marengo before his handing over control to a subordinate following injuries, and the arrival of General Louis Desaix, led to a defeat. The day after the battle he signed the Convention of Alexandria, ceding control of Italy up to the Mincio River to the French. The Austrians then withdrew.
Melas was then commander in Bohemia.
Melas retired in 1803 and died in 1806 in Týnec nad Labem, Bohemia.