Vladimir Moskovkin, writing for LeidenMadtrics, posted a delightful essay on the origins of the “publish or perish” phrase. His sleuthing traced the expression back to at least the late nineteenth century, in an attribution (undated) to Swiss historian Jacob Burckhardt:
Since Jacob Burckhardt died in 1897, the literary proven reference to the slogan "publish or perish" should be pushed back from the early 20th century (William Morris Davis, 1904) to at least the late 19th century. It would be interesting to initiate historical and archival research using the memoirs of Jacob Burckhardt and the works of his biographers in order to find more detailed information on the description of this phenomenon.