The determination and analysis of the bearing capacity of a slope foundation has become an important research topic in foundation design theory. To explore the ultimate bearing capacity of the rock foundation adjacent to a slope on the basis of the shear failure mode of a rock foundation on a semi-infinite plane, the failure mode of the rock foundation near the slope was established by analyzing the failure mechanism of the Bell solution. The upper limit theorem of limit analysis was used to build a velocity field allowable for maneuvering. Using this method, the ultimate bearing capacity of the Sandaozhuang open-pit mine was analyzed and calculated. The results show that the foundation load of the mine is less than the allowable bearing capacity; hence, the building on the slope meets the requirements of foundation bearing capacity. At the same time, this paper uses this method and existing research methods to compare and analyze this project with others, proving the rationality and feasibility of the proposed method. This paper further explores factors affecting the ultimate bearing capacity, such as the horizontal setback distance of the footing from the edge of the slope and the dip angle. It is concluded that the ultimate bearing capacity increases with increases in the distance to the slope and decreases in slope angle. The study also shows that the calculations developed and proposed in this paper for the bearing capacity of the rock foundation adjacent to the slope are reasonable and feasible, can be applied to the calculations of the bearing capacity of rock foundations near the slope, and have guiding significance for the project.