In the Tanshan area, in the Liupanshui Basin, abundant oil shale resources are associated with coals. We analyzed the cores, geochemistry of rare earth elements (REE), and trace element of oil shale with inductively coupled plasma mass spectrometry technology to define the paleo-sedimentary environment, material source, and geologic significance of oil shale in this area. The results of the summed compositions of REE, and the total REE contents (ΣREE), in the Yan’an Formation oil shale are slightly higher than the global average of the composition of the upper continental crustal and are lower than those of North American shales. The REE distribution pattern is characterized by right-inclined enrichment of light REEs (LREE) and relative loss of heavy REEs (HREE), which reflects the characteristics of crustal source deposition. There is a moderate degree of differentiation among LREE, whereas the differences among HREE are not obvious. The values indicate a weak negative anomaly, and the values indicate no anomaly, which are generally consistent with the distribution of REE in the upper crust. The characteristics of REE and trace elements indicate that the oil shale formed in an oxygen-poor reducing environment and that the paleoclimatic conditions were relatively warm and humid. The degree of differentiation of REE indicates that the sedimentation rate in the study area was low, which reflected the characteristics of relatively deep sedimentary water bodies and distant source areas. The results also proved that the source rock mainly consisted of calcareous mudstone, and a small amount of granite was also mixed in.