In what may be considered simply a recognition of what was already in progress - an American rebellion - the Second Continental Congress representing the thirteen colonies and meeting in Philadelphia, on July 2, 1776 voted for independence from Great Britain. On July 4, 1776 the declaration of that independence - the formal document written by five committeemen of the Congress - was voted on and approved. (John Adams of Massachusetts writing at the time considered July 2 to be the more important date).
This was a day that many members of the Congress had dreaded would come. It was a frightening prospect - officially and finally declaring that the thirteen colonies were in open rebellion against their monarch, King George the III and the British Parliament.
The fighting on April 19, 1775 in Lexington and Concord, the Battle of Bunker Hill, the appointment of a commanding General of the Continental Army and the raising of that army - all of these events had already taken place. The British Army had been forced to evacuate Boston in March of 1776 and was even now massing for an assault on General Washington's forces in and around New York and Brooklyn.
Like many of the battles to come in the next seven years, this was a battle the American Army would lose. But finally with the surrender of General Cornwallis at Yorktown and facing a strong American - French alliance, the British government decided to cut its losses and accepted what the Declaration of July 4, 1776 so stated - America's independence.