He studied law, was admitted to the bar in 1828 and commenced practice in Philadelphia.
He held several local offices, and was an unsuccessful candidate for election in 1836 to the Twenty-fifth Congress. He was subsequently elected as a Whig to the Twenty-fifth Congress to fill the vacancy caused by the death of Francis J. Harper. He was reelected to the Twenty-sixth Congress.
He declined to be a candidate for renomination in 1840.
He resumed the practice of law. In 1844 Naylor was present at the Philadelphia Bible Riots of 1844.
During the rioting in Southwark he prevented militia under the command of General George Cadwalader from firing on a group of nativist protesters.
He was arrested for his actions, but later released without trial.
During the Mexican–American War, Naylor raised a company of volunteers known as the Philadelphia Rangers and served as captain. After the war he settled in Pittsburgh, Pennsylvania, and continued the practice of law. He returned to Philadelphia and practiced law until his death there in 1872.
He is interred in South Laurel Hill Cemetery in Fairmount Park, Philadelphia.
He was a Whig member of the United States House of Representatives from Pennsylvania.