Gray began seriously writing poems in 1742, mainly after his close friend Richard West died. He moved to Cambridge and began a self-imposed programme of literary study, becoming one of the most learned men of his time, though he claimed to be lazy by inclination. Gray was a brilliant bookworm, a quiet, abstracted, dreaming scholar, often afraid of the shadows of his own fame. He became a Fellow first of Peterhouse, and later of Pembroke College, Cambridge. Gray moved to Pembroke after the students at Peterhouse played a prank on him.
Gray spent most of his life as a scholar in Cambridge, and only later in his life did he begin traveling again. Although he was one of the least productive poets (his collected works published during his lifetime amount to fewer than 1,000 lines), he is regarded as the foremost English-language poet of the mid-18th century. In 1757, he was offered the post of Poet Laureate, which he refused. Gray was so self-critical and fearful of failure that he published only thirteen poems during his lifetime. He once wrote that he feared his collected works would be "mistaken for the works of a flea". Walpole said that "He never wrote anything easily but things of Humour." Gray came to be known as one of the "Graveyard poets" of the late 18th century, along with Oliver Goldsmith, William Cowper, and Christopher Smart. Gray perhaps knew these men, sharing ideas about death, mortality, and the finality and sublimity of death.
In 1762, the Regius chair of Modern History at Cambridge, a sinecure which carried a salary of £400, fell vacant after the death of Shallet Turner, and Gray's friends lobbied the government unsuccessfully to secure the position for him. In the event, Gray lost out to Lawrence Brockett, but he secured the position in 1768 after Brockett's death.