I'm reading the cambridge history of Chine Volume 7 part 1 and in page 49 it says about emperor Hongwu:
" Yet to the end of his life he spoke and wrote proudly of his humble beginnings as a poor farmer's son from the disaster-ravaged Huai region, and eventually he grew scornful, even bitterly resentful, of those who had known only the refined, comfortable life of the elite."
I can't find any writtings of emperor Hongwu on the internet, but i was wandering if there is any writing from chinese emperors that survives until today; something like the meditations of marcus aurelius or the gallic wars of julius cesar.
Going with names and titles where you are more likely to find their works if you search.
Emperors certainly wrote, there were letters, edicts of orders of political argument that sometimes survive and are put in the records. An Emperor could seek to add to his prestige and authority not just via such means but via displays of scholarship and culture. Poems, music and scholarship would hopefully enhance the legitimacy of your dynasty and your family by showing how cultured they are, ruled by a family of intellectuals. Or to send a wider message to the court be it on where scholarship is heading, political intent. Or simply to mark a personal event in one's life and because poems and music was a way to pass the time.
Emperor Taizhong of the Tang dynasty helped with the creation of the history texts of the Jinshu as a scholarship project after recent controversies in an attempt to enhance the prestige and legitimacy of his dynasty and unify his court. But also to send messages like his scathing assessment of Sima Yi, whose coup against fellow regent Cao Shuang would help pave the way for a change of dynasty, to discourage anybody attempting to follow in Sima Yi's footsteps. His court historians didn't always agree which leads to Sima Yi's Jinshu having the sense of the writers pulling in two directions.
Closer to my era, Emperor of the Latter Han Emperor Ling wrote a study on Fuxi (probably with some help) and when his beloved concubine Lady Wang died under questionable circumstances, he composed a rhapsody (a form of writing he pushed for against his court) and a mourning hymn for her. His eldest son Emperor Bian would not last long before being deposed and eventually poisoned, his mourning song to his ladies in his last banquet before his death is recorded in Empress He's HHS (translation Yang Zhengyuan in Last Emperor)
Heaven’s Way changes ah, I have what troubles! Abandoning ten thousand chariots ah, withdrawing as a vassal. From rebellious minister meeting force ah, life not lasting. Passing and about to leave you ah, going to the secluded and dark!
His younger brother Emperor Xian would be the last of the Latter Han Emperors, he studied a lot in his golden cage at Xuchang but the puppet Emperor doesn't seem to have produced literary works. Whether through disinclination or, as a puppet Emperor who would lose his friends, wife, a concubine, some children and sibling to violent ends at the hands of his controllers, political caution.
The Han lost control shortly after Emperor Ling's death and when Emperor Xian abdicated on 11th December 220, there would be three claimants to the mandate. With varying quality of history departments and, in terms of scholarship, varying quality of rulers. Shu-Han's two rulers were not scholars, Liu Bei had a very good education under Lu Zhi but his interests lay elsewhere and, having carved a corner of China for himself, his reign as an Emperor would be short. His son Liu Shan was a long-ruling, kindly man but may have had an incomplete education and was not blessed with brains. Given divides between the native Yi scholars and the Jing scholars or how Liu Bei's history project descended into violence and Liu Bei hiring actors to mock those involved, this might have been fortunate.
The southern kingdom of Wu sought to establish the south's credibility as a place of scholarship and culture with poets, diviners, mathematicians, historians, commentary on other texts and so on. In terms of Emperors, they had an interest in scholarship and provided patronage but only the last would be a writer of any note. Sun Quan was more of a patron who persuaded some of the more reluctant officers like Lu Meng to study, would discuss the texts and had an interest in Buddhism, Sun Liang was deposed young when he sought to overthrow his regent. Sun Xiu was interested in books and sought discussions with the likes of Wei Zhao but was not an effective ruler. Sun Hao, a possible brutal tyrant, was a wit and had some skill at rhapsody according to Rafe De Crespigny's Generals of the South.
The Wei court held the old capitals and much of the land but the ruling Cao family had many scholars amongst them. Cao Cao only became an Emperor after his death but as well as uniting most of the land, he kept up his studies, wrote poems and rhapsodies (examples "Going out on foot by the Xia Gate" or "Songs of Qiu Hu"), a commentary on the art of war (fragments survive), liked to compose music for his work. Two of his (many many) sons would be noted literary figures of their day (a step-son He Yan became a leading philosopher) and helped build literary circles. Cao Zhi was for a time contender for succession and is the most famous poet of the era (Robert Cutter has recently published a complete collection of his poems if you have an interest in 3kingdom or ancient China poetry). Cao Pi, who became Emperor, was a patron of the arts, poet (A Poem that Concludes the Royal Command, On A Visit to the Dark Warrior Embankment, or his poem on his final campaign against Wu among others), literary critic, he collected tales of the strange and jokes.
Cao Pi's only son and successor Cao Rui had been a quiet studious youth and as an Emperor was also a poet, Rui's adopted successor Fang was deposed by Sima controller but his successor Cao Mao would spend time with academics and notables of his day and would write, following an omen, the Submerged Dragons poem that was seen as discontent towards his controller Sima Zhao with the young Emperor soon to be killed following a failed attempt to free himself. Most of Cao Mao's works were lost by the end of the Southern Liang dynasty though Cao Mao's commentary on the omens of his birth does survive in Pei Songzhi's annotations to records of the three kingdoms. The last Wei Emperor Cao Huan was not known for expressing discontent by poem and lived to abdicate to the Sima family, led by Sima Yan as this point, who founded the Jin dynasty.
In terms of whole works surviving, time takes its toll, in my case from an era long since passed (190 CE to 284 CE), including for Emperors but poems could survive in collections and fragments of others works do survive though I'm afraid no grand work that might compare to the ones your thinking of.
For some of what Cao Pi wrote survives, poems and letters with leading ministers have made it through, edicts on state matters, important information that helps us understand his decisions or the justification for them. While other works have survived but are not intact, his Dian Lun survives partially as annotations to the records of the three kingdoms, there it includes discussion on his youth (his experiences, his training, what he enjoyed doing), of the scholars of his day and the mystics.
In terms of reflections upon their life, I mentioned Cao Pi's Dian Lun and Cao Mao's talk of the omens of his birth in the Diji, translation by Yang Zhengyuan
In the past at the birth of Emperors and Kings, some had auspicious omens, so as to manifest the mystical. Considering that I am a lesser person, a cadet branch's lesser posterity, that undeservedly from the spirits received blessing, how can I dare compare myself to past worthies? I only record them to show to future generations. Thus I resignedly admit: Zhèngshǐ Second Year, Ninth Moon began on a Xīnwèi [241 Oct 22]. The twenty-fifth day was a Yǐwèi [241 Nov 15], and on the end of that day I was born. At the time, the sky was clear and bright, the sun and moon shining, so there was some yellow aura and smoke about the hall. It reflected light off the household, its color was very bright. Observers discussed this and said: 'Wèi [the eighth branch] is of Earth, the Phase of Wèi [the dynasty]. When this day is complete, there will be a great name. The aura of the smoke is a divine essence, without disaster and without harm, it envelops the spirits.' The King of Qí [Cáo Fāng] was without pity and was overturned, and all the lords accepted me, to continue the Imperial Line. Though I am a lesser person, by nature I am stubborn, and though I cannot yet reach the way, yet I seek to follow the great path, facing the abyss and crossing ice, weeping in apprehension. The ancients had a saying: 'To fear is to not fail.' I am a lesser person, so how can I dare be negligent? I will not bring disgrace [to the dynasty] and will ever seek to support the masses
There is also Cao Cao's proclamation called the Apologia where he talked of his life up till the end of 210, justifying his actions and why he has not resigned his position as chief minister of the Han and defending his stance towards the Han as a loyal subject. A short version can be found in the ZZTJ of Sima Guang's translated by Rafe De Crespigny
If you have jstor and the only free one I can think of, Howard L.Goodman's "The Orphan Ts'ao P'i, His Odd Poem, and Its Historiographic Frame" will give you a poem context and analysis on A Poem that Concludes the Royal Command
Another text analysis is Xiaofei Tian's Material and Symbolic Economies: Letters and Gifts in Early Medieval China involving Cao Cao, wife Lady Bian and Cao Pi letters to others.
Or Becoming Wen: The Rhetoric in the Final Edicts of Han Emperor Wen and Wei Emperor Wen by Meow Hui Goh
Rafe De Crespigny Imperial Warlord A Biography of Cao Cao 155-220 AD particularly Chapter Eight Court and Capital (also ending of chapter 5) includes some Cao Cao poems
A few poems and the apologia in The Annal's of Wei, translation of the Wei Emperors biographies in the SGZ by Chen Shou with annotations by Pei Songzhi, translated by Yang Zhengyuan.