Mechanically connected precast piles are a type of precast piles that utilise snap-type mechanical connectors to restrain the pile ends of two identical or different precast piles at the top and bottom so as to quickly realise the purpose of the connection. However, the gap problem in the connectors of mechanically connected piles can lead to uneven and uniform deformation of the piles under horizontal loading, resulting in additional displacements and rotation angles of the piles at the connection. Solving the problem of calculating the internal force response of discontinuous deformed piles is a prerequisite for promoting and applying mechanically connected precast piles. Firstly, the theoretical derivation of mechanically connected piles with fixed constraints at the pile bottom is carried out. Secondly, the pile response equations of mechanically connected piles are established, and the theoretical solutions of pile displacement and internal force response of mechanically connected piles under horizontal loading are derived. Thirdly, the pile-soil model of the test pile is established using ABAQUS software (ABAQUS 2016) in combination with the design data of the test pile. The numerical simulation displacements and angles of rotation are compared with the test results. Finally, the theoretical and numerical simulation displacements and internal forces of the ordinary pile and the mechanically connected pile are compared. The relative errors of the displacements and angles of rotation of the established pile-soil model are less than 10%, indicating that the established model has good accuracy. The relative errors of the theoretical and numerical simulation displacements and internal forces of the mechanically connected pile are less than 10%, proving the correctness of the theoretical calculation by the m-method. This study can provide effective theoretical support and methodological guidance for the displacement and internal force response of discontinuous piles.