The concentration of trace and rare earth elements in 22 crude oil and five oilfield water samples, collected from Triassic Yanchang Formation and Jurassic Yanan Formation reservoirs in the Jiyuan Area of Ordos Basin, N China, was determined using inductively coupled plasma mass spectrometry (ICP-MS) for the first time. The oil samples were analysed to classify the oils into family and to determine the origin and depositional environment of organic matter that yield the oils using trace elements. The REE chondrite-normalized distribution patterns of the crude oils show light rare earth element (LREE) enrichment and right-oblique curves. These patterns could be divided into two distinct types that were consistent with that of the upper continental crust (UCC) and lower continental crust (LCC) characterizing by negative Eu anomalies and positive Eu anomalies, respectively. The REE concentrations in coexisting water samples are less than those in crude oils by a factor of ten. Cluster analysis also classified the oil samples from the Ordos Basin into two main groups. Integrated analysis of Co/Ni, V/Ni and V/ (V + Ni) values suggests that the organic matter have more terrigenous source input and the palaeoenvironment was anoxic and slightly oxic conditions. This study differs from previous studies by using trace element analyses of crude oils to constrain oil-source rock correlation. The results show that most of the crude oils in north Jiyuan area were derived from Chang 7 mudstones while those from Hongde area may be contributed by Chang 7 oil shales. Copyright © 2017 John Wiley & Sons, Ltd.