Ammonia is a hydrogen-rich zero-carbon fuel, and is one of the most promising approaches to realize energy decarbonization in the fields of industry and transportation. Efficient operation and emissions control have been the primary obstacle to develop engines with high ammonia energy share. In this study, the combustion and emissions of an ammonia-fueled engine with diesel pilot ignition are investigated, and the target is to achieve ultra-high ammonia substitution with acceptable thermal efficiency. The ammonia energy share is first increased from 30% to 90% at an intermediate load, with a split diesel injection triggering ammonia combustion. It found that the increased ammonia energy share reduces the indicated thermal efficiency from 48.3% to 38.9% with high unburned ammonia emissions. The NOx emissions exhibit a turning point with increased ammonia substitution, which indicates that the NOx emissions transition from the thermal-dominated to the fuel-dominated regime. The diesel pilot injection strategy is then optimized, by advancing the main injection timing and changing the pre-injection amount and the interval between two injection events. Optimized diesel injection controls the ignition timing and combustion process, thereby improving thermal efficiency and emissions at high ammonia energy shares. An ultra-high ammonia energy share of 95% could be finally achieved, and the thermal efficiency is 40.2%. It is also noted that as engine load increases, engine thermal efficiency at an ammonia energy share of 80% could be elevated to 44.2%.