Zhang Yujun was executed for endangering public safety and Geng Jinping was executed for producing and selling toxic food, the official Xinhua news agency said.
The men were sentenced to death earlier this year by a court in the northern city of Shijiazhuang for producing and selling toxic ingredients that ended up in infant milk powder.
The scandal shocked China last year when children were given baby formula tainted with the industrial chemical melamine, which can cause kidney stones and kidney failure.
Melamine, used in the manufacture of plastics and fertiliser, was added to watered-down milk to fool inspectors testing for protein, and to boost profits.
Zhang, a cattle farmer, and Geng both had been convicted of producing and selling a phony protein powder containing melamine, much of it to producers who sold tainted milk to the now-defunct Sanlu Group Co, at the time one of China's biggest dairies.
No public inquiry
Geng's brother, Geng Jinzhu, was given eight years; his sentence was upheld on Thursday.
In all 21 people were tried and sentenced in January over the scandal, including Sanlu's general manager, Tian Wenhua, who was given a life sentence after pleading guilty to charges of producing and selling fake or substandard products.
Three other former Sanlu executives were given between five years and 15 years in prison.
A total of 21 defendants were being sentenced Thursday in connection with the case.
The harsh sentences underscored the government's resolve in tackling recurring food safety problems and an eagerness by the communist leadership to move past the embarrassing scandal.
However, no public investigation was ever made into accusations that news of the melamine tainting was suppressed ahead of last year's Beijing Olympic Games because the government did not want it overshadowing the prestigious event.
The scandal came to light in September 2008, reviving long-standing fears over product safety in China and leading to recalls and bans around the world of Chinese-made products.
China says it has executed two people for their roles in a milk contamination scandal in which at least six children died and more than 300,000 became sick.