On July 2nd, 1776 the Second Continental Congress passed the Lee Resolution to declare it’s independence from the Kingdom of Great Britain. It was later adopted and formally declared on July 4th. You can read more here.