The seemingly heartless act of Emperor Ung Chính executing the faithful servants of Khang Hi for 60 years actually had a reason behind it.
After the death of Emperor Khang Hi on December 20, 1722, his fourth son, Ung Thân, ascended to the golden throne. He became the 5th emperor in the history of the Qing dynasty. Ung Chính was renowned in history as a diligent emperor, frugal, and with resolute anti-corruption policies.
In contrast to Khang Hi, Ung Chính, upon ascending the throne, governed the country with an iron fist, establishing the Land Force Agency, a crucial institution with a significant impact on the state affairs of the dynasty, to consolidate power. Those chosen for this agency were called Great Ministers of the Land Force and were highly trusted by the emperor.

Under the rule of Ung Chính, the Qing dynasty continued the prosperity from the time of Khang Hi and extended its dominance to the era of Emperor Qianlong. Therefore, , a phase of extreme development for the Qing dynasty.
Clearly, Ung Chính was a skilled and diligent emperor in history. However, one controversial act of his was executing the loyal servants who had served Khang Hi for 60 years right on the night of the demise of this emperor.
What has transpired?
Why did Emperor Ung Chính take such action?
The person steadfastly sentenced to death by Ung Chính is the eunuch Trieu Xuong. This eunuch had been by Khang Hi's side since childhood, faithfully serving the renowned emperor for 60 years. It was on the night of Emperor Khang Hi's passing that this eunuch also met his demise.
Trieu Xuong and Emperor Khang Hi grew up together, experiencing many ups and downs and holding numerous secrets. During his lifetime, Trieu Xuong, intelligent and astute, understood the emperor's thoughts and remained loyal to Khang Hi. After Emperor Khang Hi seized supreme power, Trieu Xuong was highly esteemed and became a powerful eunuch in the court.
Trieu Xuong was appointed as the Chief Administrator of the Internal Affairs, the agency responsible for managing all activities for the emperor and the imperial family. This alone indicates how highly Emperor Khang Hi regarded and trusted Trieu Xuong.

In the final years of his life, Emperor Khang Hi had to witness his own princes vying for the throne. It is referred to as 'The struggle of the nine sons'. This event involved 9 princes of Khang Hi emerging to contend for the inheritance rights.
Being by Khang Hi's side throughout, it's natural that eunuch Trieu Xuong knew many secrets during the famous emperor's heir selection process. The succession battle concluded with the victory of the fourth prince Dận Chân. He was chosen as the successor and ascended to the throne.
So, what led Ung Chính to execute Trieu Xuong right on the night of Emperor Khang Hi's demise?
After sentencing Trieu Xuong to death, Emperor Ung Chính announced the grave offenses of this eunuch. First, Trieu Xuong abused his position to commit wrongful acts beneficial to his relatives. Second, Trieu Xuong accepted bribes and embezzled 5,000 silver taels from the treasury. This was an unforgivable crime.
However, these offenses seem to serve as a smokescreen for Ung Chính's intention to execute Trieu Xuong. In reality, this emperor hastily executed Trieu Xuong for the following 3 reasons.
The reasons Ung Chính insisted on executing Khang Hi's loyal kin

First, Trieu Xuong might know too much about Khang Hi's testament as he was always close when the emperor was on his deathbed. Khang Hi, a talented emperor, ruled the Qing dynasty for 61 years. During his reign, he often designated and deposed crown princes. This vacant prestigious position for a considerable time contributed to factionalism and ultimately led to the tragic event of 'The struggle of the nine sons'.
The struggle for the golden throne persisted until the demise of Emperor Khang Hi. Aware of his severe illness, Khang Hi hastily drafted a testament to select his heir. Many court officials favored Dận Trinh, the 14th prince, a son dearly beloved by Khang Hi.
However, the ultimate heir to the golden throne was the fourth prince, Dận Chân, now Emperor Ung Chính. This outcome surprised many. Hence, Ung Chính sentencing Trieu Xuong to death was a swift way to quell rumors surrounding his unexpected ascension.

Secondly, Ung Chính sentenced Trieu Xuong to death to avoid revealing the internal affairs of the imperial family, preventing mockery from the public. Despite Khang Hi bringing prosperity to the Qing dynasty, he was not without flaws.
On the other hand, Trieu Xuong, being a eunuch close to Khang Hi for 60 years, naturally knew everything within the palace. To prevent the secrets of the celestial emperor and royal scandals from being exposed, leading to public ridicule, Emperor Ung Chính had no choice but to kill Trieu Xuong.

Thirdly, the 'kill the chicken to scare the monkey' strategy. This was the cunning plan of Emperor Ung Chính. Despite being declared the heir after Khang Hi's demise, Ung Chính had not been acknowledged by most court officials. They believed the throne should pass to one of the fourteen princes.
Therefore, to consolidate power, intimidate the officials, Emperor Ung Chính resorted to firm measures. The execution of Trieu Xuong and the proclamation of grave offenses were seen as a crucial 'psychological strategy' by this emperor. Eliminating obstacles and simultaneously intimidating those not yet submissive to the new emperor were deemed essential.
This also serves as evidence of the talent and profound thinking of Emperor Ung Chính.
Source: Sohu, Baidu