A balanced supply of essential nutrients is an important factor influencing root architecture in many plants, yet data related to the interactive effects of two nutrients on root growth are limited. Here, we investigated the interactive effect between phosphorus (P) and magnesium (Mg) on root growth of Arabidopsis grown in pH-buffered agar medium at different P and Mg levels. The results showed that elongation and deviation of primary roots were directly correlated with the amount of P added to the medium but could be modified by the Mg level, which was related to the root meristem activity and stem-cell division. High P enhanced while low P decreased the tip-focused fluorescence signal of auxin biosynthesis, transport, and redistribution during elongation of primary roots; these effects were greater under low Mg than under high Mg. The altered root growth in response to P and Mg supply was correlated with AUX1, PIN2, and PIN3 mRNA abundance and expression and the accumulation of the protein. Application of either auxin influx inhibitor or efflux inhibitor inhibited the elongation and increased the deviation angle of primary roots, and decreased auxin level in root tips. Furthermore, the auxin-transport mutants aux1-22 and eir1-1 displayed reduced root growth and increased the deviation angle. Our data suggest a profound effect of the combined supply of P and Mg on the development of root morphology in Arabidopsis through auxin signals that modulate the elongation and directional growth of primary root and the expression of root differentiation and development genes.