Nailing is one of the most widely used stabilization techniques because of its technical and economic advantages. It is a practical and effective solution for the reinforcement of in-place slopes. It consists of placing in the soil high resistance nails to increase the cohesion of the soil and its resistance to traction and shear, which allows having a new material of great capacity. In this paper, we present the slope stability study in a section twinning of the road and railroad infrastructures between the kilometer points (KP) 105+938 and 106+263 of the line connecting Casablanca to Marrakech. The railroad track's topographic constraints and geometric requirements made the nailing method appeal to the realization of the new railroad in this area. The objective of this work is, on the one hand, to present the stability analysis of the slope before the earthwork and the implementation of the new railroad and, on the other hand, to evaluate the performance and stability of the nailed walls. The stability analysis of the soils in this section was verified in terms of safety coefficient using the calculation software TALREN. In the end, it can be concluded that the stability calculation results are conclusive and allow for highlighting the effectiveness of the innovative solution of nailing. This technique can be considered a good alternative to improve the safety and performance of excavation walls.