Precast ultra-high-performance concrete (UHPC) has emerged as indispensable in the engineering sector due to its cost-effectiveness and superior performance. Currently, precast UHPC grapples with challenges pertaining to slow setting times and insufficient early strength, largely attributed to its high water-reducing agent content. Effective utilization of early strength agents to augment UHPC's early strength is pivotal in addressing this issue. This study investigates the efficacy of two distinct concrete early strength agents, namely calcium formate (Ca(HCO2)2) and aluminum sulfate (Al2(SO4)3). A UHPC system with a water/cement ratio of 0.17 was used; both single and compound doping experiments were conducted using varied dosages of the aforementioned early strength agents. Our results show that both early strength agents significantly reduce setting time and enhance early strength at appropriate dosages. Specifically, the addition of 0.3% Ca(HCO2)2 led to a 33.07% decrease in setting time for UHPC. Moreover, the incorporation of 0.3% Ca(HCO2)2 and 0.5% Al2(SO4)3 resulted in a strength of 81.9 MPa at 1.5 days, representing a remarkable increase of 118.4%. It is noteworthy that excessive use of Ca(HCO2)2 inhibits the hydration process, whereas an abundance of Al2(SO4)3 diminishes the early strength effect. Simultaneously, this article provides recommendations regarding the dosage of two distinct early strength agents, offering a novel solution for expediting the production of prefabricated UHPC with a low water/cement ratio and high water-reducing agent content.