In 1776 Pennsylvania began raising new units for the Continental Army, and on March 21, 1776, Atlee was named Colonel of a unit, the Pennsylvania Musketry Battalion. Once they were organized, he led them north to the defense of New York City. During the Battle of Long Island on October 27, 1776 he led the original defense of the Old Stone House in Brooklyn, New York. The house was situated on high ground and covered the American withdrawal. Atlee's force was driven from the house, but General William Alexander came to support him. The Americans twice recaptured the house. The defenders directly engaged three British regiments, led by General Cornwallis. They held out until noon, allowing most of the Continental forces in Brooklyn to successfully withdraw to the Brooklyn Heights. At last, surrounded and cut off by the Hessians, General Alexander surrendered in the early afternoon. While watching this action from fortifications to the north on Brooklyn Heights, General Washington remarked, "Good God, what brave men must I lose this day!" Samuel Atlee remained a prisoner of war until he was exchanged in October of 1778.
Atlee was returned to the state assembly in 1785 and 1786. He died on November 25, 1784 while attending a meeting of the legislature in Philadelphia, and is buried in the Christ Church Burial Ground there.
The Old Stone House that he defended in the battle of Brooklyn still stands, now at the corner of Fourth Avenue and Third Street. It is in Byrne Park, and is open to the public on a limited basis.