William Maxwell was a Presbyterian of Scottish descent born in County Tyrone, Ireland in about 1733. By 1747 his family had come to North America, and settled in Warren County, New Jersey. When the French and Indian War broke out in 1754 Maxwell enlisted in the provincial militia, and served in the disastrous expedition of General Edward Braddock. He served as an ensign in Col. John Johnson's N.J. Regiment and then a lieutenant in Col. Peter Schuyler's regiment, the Jersey Blues, and was likely on the 1758 campaign that culminated in the debacle of the Battle of Carillon. At the end of the war he remained in military service, serving on the western frontier.
When tensions leading up the American Revolutionary War increased, Maxwell resigned his commission and became active in Patriot political and resistance activity in New Jersey. When the war broke out he was commissioned as colonel of the 2nd New Jersey Regiment in November 1775. The regiment was among troops sent to Quebec under General John Sullivan in early 1776, and was involved in the Battle of Trois-Rivières before the Continental Army retreated to Fort Ticonderoga. Promoted to brigadier general, Maxwell returned to New Jersey to join General George Washington's army after its retreat across New Jersey following the loss of New York.
In August 1777, Gen. George Washington assigned Maxwell, then commanding the New Jersey Brigade in the Main Army, to organize and command a provisional Corps of Light Infantry, culling 100 of the best troops from each of the army's ten brigades. This force formed the advanced skirmish line in the defense of Philadelphia, and was involved in the Battle of Cooch's Bridge prior to the Battle of Brandywine. Maxwell's brigade served as the reserve at the October Battle of Germantown, and spent the winter at Valley Forge. After Germantown Maxwell was brought up on charges of excessive drinking.
In May 1778, Washington sensed that the British were evacuating Philadelphia, so he sent General Maxwell with four New Jersey regiments and two pieces of artillery to reinforce the New Jersey militia. Maxwell's troops were among those harassing the British as they crossed New Jersey to New York, and were involved in the Battle of Monmouth.
He was a member of the 1779 Sullivan Expedition (specifically at the request of John Sullivan) against Iroquois lands in upstate New York, and fought in the Battle of Newtown, the only major action of the campaign. When Sullivan was ill during the expedition, Maxwell had command of the entire force. In 1780 his troops were stationed on guard duty outside New York, and were called out to repulse two British advances on the main army base at Morristown in the June battles at Springfield and Connecticut Farms.
Maxwell, apparently feeling he was inadequately recognized for his contributions, tendered his resignation to Congress in 1780 in the hopes that he would be rewarded. However, Congress accepted his resignation, ending his military career. He tried to get reinstated, but was unsuccessful.
After the war Maxwell served one term in the New Jersey state legislature, but did not notably distinguish himself. He died on November 4, 1796, while visiting a friend, Charles Stewart in Landsdown in Hunterdon County. He was buried in the Presbyterian church yard in his hometown of Greenwich Township, Warren County, New Jersey.