In 1770, Cox purchased the iron works at Batsto in Burlington County, New Jersey and produced household items such as cooking pots and kettles. Throughout the American Revolutionary War, the iron works produced cannon barrels and iron shot along with other equipment for the army.  

In 1770, Cox purchased the iron works at Batsto in Burlington County, New Jersey and produced household items such as cooking pots and kettles. Throughout the American Revolutionary War, the iron works produced cannon barrels and iron shot along with other equipment for the army.

John Cox was an early supporter of the Patriot cause and was elected as a Deputy to the Provincial Convention of Pennsylvania in 1774 and 1775. Although he lived in Pennsylvania, he also owned property in New Jersey and was appointed as a Justice of the Peace for Burlington and Gloucester counties on February 8, 1775. On February 14, he was appointed to the Committee of Observation for Burlington County. In 1775, he was also appointed a Major in the Second Battalion of the Pennsylvania Associated Militia and in 1776 was elevated to Lieutenant Colonel. With this battalion, he was very active in the campaign in New Jersey in December 1776.

On March 2, 1778, Lieutenant Colonel Cox was appointed by Congress to be Assistant Quartermaster-General serving under General Nathanael Greene. In 1778, he moved to Trenton with his wife and six daughters. They lived at Bloomsbury Court—a house built by early Trenton resident, William Trent, in about 1719. On October 8, 1782, John Cox was elected to represent Burlington County on the New Jersey Legislative Council and then, on October 24, was elected Vice President of the Council.

John and Esther Cox returned to Philadelphia in 1792. He died a year later on April 25, 1793 and was buried in Christ Church Cemetery.