Cheng Yu's original given name was Li () but he changed it to Yu (昱; literally lifting the sun) after he had a dream about the sun on top of Mount Tai. He was from Dong'e County, which is in present-day Shandong. There is nothing recorded in history about his early life; he was known for his courage in the areas around his hometown when he was in his early 40s. When the Yellow Turban Rebellion broke out in the 180s, a county magistrate, Wang Du, burnt down the food stored in the warehouse and instigated his subordinates to seize the city. The county prefect escaped the city and went into hiding, while the town residents took their families eastward and camped beside a mountain. After receiving intelligence from his spies that Wang Du had moved out and camped 1.3 to 1.6 miles away from the city, Cheng Yu reported to and told a local parvenu, Xue Fang, that Wang Du must not have the ability to control the situation, so they should retrieve the prefect and reoccupy the city. Xue Fang agreed to Cheng Yu's plan, yet the commoners refused to comply, wherein Cheng Yu angrily said: Stupid commoners lack the ability to plan. He then plotted with Xue Fang, and secretly sent several cavalry holding streamers to the hilltop, where they rode down toward the civilians. Xue Fang and his men then screamed upon seeing the riders, making the commoners mistake them for Yellow Turban rebels. Led by Xue Fang, the mass kept running until back into the city, where they realised that the rebels were not so terrifying and started to defend the city with the prefect, whom Cheng Yu found later.