He was born at Floby in Västergötland (now part of Falköping Municipality, Västra Götaland County). He studied at the Royal Academy of Turku, and already had some reputation as a poet when he became a "docent" in aesthetics at the school in 1774.
Three years later he moved to Stockholm, where in 1778 he began publishing the journal "Stockholms-Posten" with Assessor Carl Lenngren. Kellgren was sole editor from 1788 onwards. In 1779, he wrote a poem portraying the young and popular actress Ulrica Rosenblad's funeral, a verse quoted in the press. Kellgren was librarian to Gustavus III from 1780, and became his private secretary in 1785. At the establishment of the Swedish Academy in 1786 he was appointed one of its first members.
He died at Stockholm. Kellgren was never married, but was at one point the lover of the prima donna Fredrique Löwen.
His strong satiric tendency led him into numerous controversies, the chief that with the critic Thomas Thorild, against whom he directed his satire Nytt försök till orimmad vers, where he also sneers at the "raving of Shakespeare" and "the convulsions of Goethe." His lack of humour detracts from the interest of his polemical writings. His poetical works are partly lyrical, partly dramatic; his plays are based on plots by Gustavus III. The songs interspersed in the four operas which they produced together, viz., Gustaf Vasa, Gustaf Adolf och Ebba Brahe, Aeneas i Carthago, and Drottning Kristina, are wholly the work of Kellgren.
From about 1788 a graver feeling pervades Kellgren's verses, owing partly to the influence of Lessing and Goethe, but probably more directly due to his controversy with Thorild. Of his minor poems written before that date the most important are the charming spring-song Vinterns valde lyktar, and the satirical Mina Löjen, an attack on the songwriter Carl Michael Bellman, and Man äger ej snille för det man är galen. The best productions of what is called his later period are the satire Ljusets fiender, the comic poem Dumboms lefverne, the warmly patriotic Kantat d. 1. Jan. 1789, the ode Till Kristina, the fragment Sigwart och Hilma, and the beautiful song Nya skapelsen, both in thought and form the finest of his works.
Among his lyrics are the choicest fruits of the Gustavian age of Swedish letters. His earlier efforts, indeed, express the superficial doubt and pert frivolousness characteristic of his time; but in the works of his riper years he is no mere "poet of pleasure," as Thorild contemptuously styled him, but a worthy exponent of earnest moral feeling and wise human sympathies in felicitous and melodious verse.
His Samlade skrifter ("Collected works", 3 vols., 1796; a later edition, 1884-1885) were revised by himself. His correspondence with Nils von Rosenstein and with Abraham Niclas Clewberg was edited by Henrik Schück (1886-1887 and 1894).