IntroductionDifferences in leg and hip morphology exist between sexes and developmental hip dysplasia is known to alter proximal femoral morphology. The purpose of this study was to determine whether existing differences in leg alignment due to sex or developmental hip dysplasia have an effect on changes in leg alignment after total hip arthroplasty.Materials and methods30 hip osteoarthritis patients underwent biplanar full-length radiography in the standing position preoperatively and 3 months after total hip arthroplasty. Differences in leg alignment between men and women and between patients with primary hip osteoarthritis and patients with developmental dysplasia before and after surgery were tested using a general linear model for repeated measures.ResultsImplantation of a hip prosthesis had no differential effect on ipsilateral leg alignment in patients with hip osteoarthritis due to dysplasia and in patients with primary hip osteoarthritis. However, patients with hip osteoarthritis due to dysplasia had a 2.1° higher valgus both before and after surgery. After total hip arthroplasty, women had a significantly greater increase in varus angle (1.6° vs. 0°) and femoral offset (10.5 vs. 4.6 mm) compared with men. Because the change in acetabular offset was smaller (2.2 vs. 6.2 mm), the global femoral offset was only increased in women. Femoral torsion was constant for men (15.0° and 16.5°), whereas femoral torsion was significantly reduced in women (19.9° and 13.2°).ConclusionsHip arthroplasty has a greater effect on leg axis in women than in men. The axial leg alignment of women could change from a natural valgus to a varus alignment. Therefore, surgeons should consider the effects of total hip arthroplasty on leg alignment in patients with hip osteoarthritis. Whether these changes in leg alignment are also clinically relevant and lead to premature medial or lateral knee osteoarthritis should be investigated in future work.Trial registrationThis study was registered with DRKS (German Clinical Trials Register) under the number DRKS00015053. Registered 1st of August 2018.Supplementary InformationThe online version contains supplementary material available at 10.1007/s00402-022-04587-y.