September, 1785, saw his [Franklin's] work finished abroad and him returning to America, Scarcely more than arrived he was chosen Governor of the State of Pennsylvania, and was reelected in 1786 and 1787. During the last named year he was a delegate to the convention which framed the present Constitution. His final public act was in 1790, when as President of the Anti-Slavery Society, he sent a memorial to Congress entreating for the abolition of the slave trade and the emancipation of the slaves. The slave owners were indignant and their spokesman, General James Jackson of Georgia, made a fiery speech in which he attempted to demonstrate the sanctity of the institution by texts from the Scripture.
Franklin promptly wrote an answer which was published in the National Gazette and was laughed at by the people for many years. It was a parody on Jackson's address even more solemn, stilted and hypocritical put into the mouth of a councilor of the Divan of Algiers and fortified by numerous texts from the Koran. He wrote it within four weeks of his death.
Source: William Jackson, History of the American Nation, Vol.8, p.2297