He was born at Pinmore in the parish of Ayr, Scotland. His father was Robert Kennedy of Pinmore, and his mother Robina, daughter of John Vans of Barnbarroch, Wigtownshire, who on marrying his cousin assumed the name of Agnew. Robert Kennedy was ruined by the failure of the Ayr bank, and had to sell Pinmore and move to Edinburgh, where he died in 1790. Kennedy was the youngest son; one of his sisters was writer Grace Kennedy. He was educated at Edinburgh, Berkhamsted, and at Monmouth. He returned to Edinburgh, age 14, obtained a cadetship, and sailed for Bombay (Mumbai) in 1800.
Shortly after his arrival Kennedy was employed with his corps, the 1st battalion of the 2nd Grenadiers, in an attack against the Malabar district, and received a wound in his neck, from which he suffered all his life. In 1807 he became Persian interpreter to the Peshwa's subsidiary force at Sirur, then commanded by the Colonel William Wallace (died 1809). While at Sirur Kennedy knew Sir Barry Close and Sir James Mackintosh.
In 1817 Kennedy was appointed judge-advocate-general to the Bombay army. Mountstuart Elphinstone, who admired him as a scholar, gave him the appointment of Marāthā and Gujarāti translator of the regulations of government, but the post was abolished a few months after Elphinstone's retirement. He held the office of judge-advocate-general till 1835, when he was removed by Sir John Keane. After that he was appointed oriental translator to the government, and he held this office for the rest of his life.
Kennedy was studious, collected manuscripts and employed munshi teachers. In 1817 he contributed a paper on Persian literature to the Literary Society of Bombay; he also contributed several papers to the Bombay branch of the Royal Asiatic Society and was President of the branch from 1831 to 1835.
In 1824 Kennedy published at Bombay a Maratha dictionary. He published in London Researches into the Origin and Affinity of the Principal Languages of Asia and Europe (1828),’ and in 1831 he followed this up with Researches into the Nature and Affinity of Ancient and Hindu Mythology. In the first work he remarked on the Arabic words in the Shāhnāma. Kennedy also wrote five letters on the Purānas, and engaged in controversy with Horace Hayman Wilson and Graves Champney Haughton He published at Bombay in 1832 a work on military law, of which a second edition appeared in 1847.
- Researches into the Origin and Affinity of the Principal Languages of Asia and Europe (1828)
- Researches into the Nature and Affinity of Ancient and Hindu Mythology (1831)