In order to solve the problems existing in conventional hydrofracturing stress measurement, an optical sonic measurement while drilling system was applied to hydrofracturing measure deep rock in-situ stress in the southwest margin zone of Ordos Plateau in this paper, the variation law of in-situ stress with depth is obtained, and the results are compared with those of the in-situ stress in a typical area of North China Plain. The results show that the in-situ stress in the southwest platform margin of Ordos Plateau is lower than the statistical results of the crustal stress in the shallow crust of Mainland China, the in-situ stresses increase linearly with depth, and the growth rate of the minimum horizontal principal stress is higher than that of the maximum horizontal principal stress. The maximum and minimum horizontal principal stress is lower than that in North China Plain. Due to the influence of regional structure and plateau platform, the direction of geostress is deflected to the east compared with the North China Plain. The lateral pressure coefficients reflected by the ratio of maximum and minimum horizontal principal stress to vertical stress are lower than those in North China Plain, but the difference between the two horizontal maximum and minimum principal stresses is higher than that in North China Plain. Although the overall level of geostresses in plateau edge is lower than that in North China Plain, the great difference of horizontal principal stresses is not conducive to the stability of underground engineering.