Your remembrance is correct, kind sir. Hale was a teacher in CT, and was a well-known Patriot. When he went to Long Island to spy, he was dressed as laborer or farmer, and it was Robert Rogers of Rogers Rangers fame (French and Indian War) who spotted the buckled shoes he was wearing and figured he might have been a spy. Rangers was a Loyalist, obviously...also, plaque on 65th and Third Ave. in NYC near to where he was likely hung.
The British were going to convey him elsewhere either for trial or incarceration when spectators immediately recognized him and called to him. He was hanged there and then as a spy... and without a trial.
BTW I am not a sir.