The invention discloses a simulation test method and device for an on-board diagnostics (OBD) function of a diesel engine after-treatment system. Various faults of a selective catalytic reduction (SCR) and diesel particulate filter (DPF) after-treatment system are summarized, fault features are extracted, and a set of virtual instrument-based electronic simulation test system for an OBD fault diagnosis function of the SCR and DPF system is established through the fault features, so that simulation of partial faults of the SCR and DPF system can be realized, and then the rapid test of the OBD fault diagnosis function is completed. In the process of development, acceptance and evaluation of an OBD diagnostic algorithm of the diesel engine after-treatment system, a large number of test verification work and test resources are reduced, and the development progress is improved. In addition, the method and device can well solve the problems that in an actual test environment, certain OBD faults are not easy or impossible to produce, so-called fault injection is supposed to be performed by a hardware-in-the-loop system, and immeasurable damage to a vehicle or an engine can be caused.