In the process of unconventional oil and gas exploitation, fracturing is generally needed to improve industrial productivity. Brittleness, an essential factor of reservoir fracturing evaluation, is the key to improving the production of unconventional reservoirs. Shanxi formation of Yanchang gas field in Ordos Basin has the features of low porosity, poor permeability, and strong heterogeneity, which result in low productivity in natural conditions. In order to study the mechanical properties and fracturing ability of the reservoir, triaxial compression tests were carried out on 35 sandstone cores in the study area, and the mechanical parameters, rupture mode, stress–strain, and brittleness characteristics of the sandstone were obtained. The results show that the compressive strength is positively correlated with the elastic modulus and negatively correlated with the Poisson’s ratio. The samples have obvious brittle rupture characteristics and the brittleness index in the range of 47.9–52.2%. The dynamic parameters obtained by logging can be converted into static parameters in petroleum engineering application, and then the reservoir brittleness can be evaluated dynamically and continuously. Taking well X-2 in the study area as an example, the brittleness index calculated by stress–strain method and mineral composition method is 47.9 to 53.5% and 48.8% respectively, which is well matched with the logging interpretation, indicating that the results obtained by logging interpretation are relatively accurate. Based on mechanical experiments and logging evaluation results, the study could provide a parameter basis for selecting the favourable fracturing position of Shanxi formation in Yanchang gas field.