Hydrogen is a clean and renewable alternative fuel. In this paper, the combustion mechanism of diesel/hydrogen dual fuel is constructed and verified. The mechanism is combined with three-dimensional numerical simulation to study the effects of pilot injection and main injection on the combustion and emissions of a diesel/hydrogen dual fuel engine. The mechanism uses a 70% mole fraction of n-decane and 30% mole fraction of α-methylnaphthalene as diesel substitutes, and it combines n-decane, α-methylnaphthalene, NOX, PAH, soot and H2/C1-C3 sub-mechanisms to form a diesel/hydrogen dual fuel combustion mechanism. The mechanism was verified by chemical kinetics, including the ignition delay time, JSR (Jet Stirred Reactor) oxidation and laminar flame speed, and then, it was verified by computational fluid dynamics. The results show that the simulated values are in good agreement with the experimental values of cylinder pressure, heat release rate and emissions data. The mechanism can well predict the combustion and emissions of a diesel/hydrogen dual fuel engine. Compared with single injection, the peak heat release rate, peak cylinder pressure and MPIR (Maximum Pressure Rise Rate) increase with the increase in pilot mass percent from 5% to 20%, which makes the phase of CA10 and CA50 advance and reduces CO emissions, but NOX emissions increase. With the advance of pilot injection timing from 10° CA BTDC to 30° CA BTDC, the peak cylinder pressure increases, the peak heat release rate decreases, CA10 and CA50 advance, CO emissions decrease, NOX emissions increase and NOX emissions peak at 30° CA BTDC. When the pilot injection timing is further advanced from 30° CA BTDC to 50° CA BTDC, the peak cylinder pressure decreases, the peak heat release rate increases, CA10 and CA50 are delayed, CO and NOX emissions are reduced, and NOX emissions at 50° CA BTDC are lower than those at 10° CA BTDC. With the advance of main injection timing from 0° CA BTDC to 8° CA BTDC, CO emissions decrease, NOX emissions increase, the peak cylinder pressure increases, the peak heat release rate decreases slightly first and then increases, and the peak cylinder pressure and peak heat release rate corresponding to the overall phase shift forward. When the main injection timing is advanced to 6° CA BTDC, MPIR is 1.3 MPa/° CA, exceeding the MPIR limit of diesel engine 1.2 MPa/° CA.