He was born in the Thirteen Colonies, possibly in Boston, and came to Newfoundland with his father at the start of the American Revolution. He worked for St. John's merchant Nathaniel Philips as a clerk. Later, Lilly was employed as a notary public and auctioneer. In 1800, he married Mary Ann Roberts. He helped raise a militia unit during the War of 1812 and served himself as a captain. In 1820, he was enrolled as a barrister although he had no formal legal training. In 1834, Lilly was named acting assistant judge for the Supreme Court of Newfoundland.
Kielley v. Carson
In 1838, he granted a writ of habeas corpus to the solicitor for Edward Kielley, who was being held for an alleged breach of the House of Assembly's parliamentary privilege. Lilly declared the warrant, that had been issued by William Carson, void and set Kielley free. Lilly himself was subsequently arrested by the sergeant-at-arms of the assembly. After two days, he was released following the proroguing of the assembly by Governor Sir Henry Prescott. Following his release, he ruled that the assembly did not necessarily have the same privileges as members of the British House of Commons but that members of the house could pursue justice through the laws of the land like any other citizen. In December 1838, he held a dissenting opinion when the Newfoundland Supreme Court ruled in favour of the assembly in the case Kielley v. Carson. This decision was overturned by the judicial committee of the British Privy Council in January 1843, whose arguments were consistent with those put forward earlier by Lilly.