On July 26, 1775, Hankinson was commissioned a captain in the Sussex County Militia, commanded by Colonel Ephraim Martin.: He was raised to Colonel the following year and stationed at Sandy Hook to defend the New Jersey coast along New York Harbor.: In 1777, the Sussex County Militia fought at the Battle of Brandywine Creek and arrived late at the Battle of Germantown near Philadelphia.: Later in the war, Hankinson and the militia were stationed in the Minisink, a region encompassing the area north of the Delaware Water Gap surrounding the Delaware River's valley in northwestern New Jersey and northeastern Pennsylvania, and the Neversink River in Orange County, New York.: Here, after the burning of Machackameck (now Port Jervis, New York, the militia was ordered to prevent incursions by British loyalists, tories, and their allied Indian tribes (Munsee, Lenape, Iroquois) under Captain Joseph Brant. This region was formerly defended by Pulaski's Legion before their deployment to operations in South Carolina. At the close of the war, Hankinson was promoted to Brigadier General.: