Let $mathscr{G}_{n,beta}$ be the set of graphs of order $n$ with given matching number $beta$. Let $D(G)$ be the diagonal matrix of the degrees of the graph $G$ and $A(G)$ be the adjacency matrix of the graph $G$. The largest eigenvalue of the nonnegative matrix $A_{alpha}(G)=alpha D(G)+A(G)$ is called the $alpha$-spectral radius of $G$. The graphs with maximal $alpha$-spectral radius in $mathscr{G}_{n,beta}$ are completely characterized in this paper. In this way we provide a general framework to attack the problem of extremal spectral radius in $mathscr{G}_{n,beta}$. More precisely, we generalize the known results on the maximal adjacency spectral radius in $mathscr{G}_{n,beta}$ and the signless Laplacian spectral radius.