Let P k be the path of order k. The square P k 2 of P k is obtained by joining all pairs of vertices with distance no more than two in P k . A graph is called H-free if it does not contain H as a subgraph. In this paper, we consider a Brualdi-Solheid-Turán type problem for P 5 2 -free graphs, and determine the maximum spectral radius among P 5 2 -free graphs of order n.