Machine learning technologies have been extensively applied in high-performance information-processing fields. However, the computation rate of current hardware is severely circumscribed by the conventional Von Neumann architecture. Photonic approaches have demonstrated extraordinary potential for executing deep learning involving complex calculations. In this work, an on-chip diffractive optical neural network (DONN) based on a silicon-on-insulator (SOI) platform is proposed to perform machine learning tasks with high integration and low power consumption. To validate the proposed DONN, we fabricated 1-hidden-layer and 3-hidden-layer on-chip DONNs with footprints of 0.15 mm2 and 0.3 mm2 and experimentally verified their performance in a classification task on the Iris plants dataset, yielding accuracies of 86.7% and 90%, respectively. The proposed fully passive on-chip DONN provides a potential solution for accelerating future artificial intelligence hardware with enhanced performance.