When the Revolutionary War began, his militia became part of the 1st Delaware Regiment of the Continental Army. Colonel John Haslet quickly reassigned him to duty as the regimental surgeon. He served with distinction and saw action at the battles of Brooklyn, White Plains, Trenton, and Princeton. Haslet's unit was virtually destroyed in the Battle of Princeton in January 1777. Colonel Haslet was killed and the command structure was rebuilt. Tilton remained in service with the Continental Army as the head of military hospitals, first at Princeton and later at Trenton, New Jersey and other sites; and when active fighting ended in 1781 he returned to his practice at Dover. A specially designed experimental hospital that Dr. James Tilton constructed and used successfully at Basking Ridge in the winter of 1779-80. The three wards, equipped with bunks, accommodated twelve patients in the central section and eight in each wing. In cold weather a "fire was built in the midst of the ward, without any chimney, and the smoke circulating about, passed off through an opening about 4 inches wide in the ridge of the roof." The patients lay with their heads to the wall and their feet turned to the fire. The smoke, Tilton wrote, combatted "infection, without giving the least offense to the patient, for it always rose above their heads, before it spread abroad in the ward." Thus, he maintained, he had provided a small, uncrowded, completely ventilated hospital in which patients suffering from fevers could be separated from the wounded. The hospital could hold up to 55 patients.
Post-Revolutionary War
As the war was ending, the surviving Delaware officers organized a chapter in the Society of the Cincinnati. Tilton was elected their first president at a meeting in Wilmington on July 4, 1783. He served in that office until 1793. During this time he also moved to a home and farm just outside Wilmington. Delaware named Tilton as a delegate to the Continental Congress three times from 1783 until 1785, although he didn't attend sessions in the last year. He also served several terms in the state's House of Representatives. The War of 1812 caused the U.S. Army to reorganize support and administrative functions in 1813. This included the creation of a position for a Surgeon General of the Army. Dr. Tilton was appointed and served as the first Surgeon General from June 1813 until June 15, 1815. Tilton died in 1822 at his home just outside Wilmington, and is buried in the Wilmington and Brandywine Cemetery. He was a longtime member of the American Philosophical Society and headed the Delaware Medical Society.