  Let $\alpha\in[0,1)$, and let $G$ be a graph of even order $n$ with $n\geq
f(\alpha)$, where $f(\alpha)=10$ for $0\leq \alpha\leq1/2$, $f(\alpha)=14$ for
$1/2<\alpha\leq 2/3$ and $f(\alpha)=5/(1-\alpha)$ for $2/3<\alpha<1$. In this
paper, it is shown that if the $A_\alpha$-spectral radius of $G$ is not less
than the largest root of $x^3 - ((\alpha + 1)n +\alpha-4)x^2 + (\alpha n^2 +
(\alpha^2 - 2\alpha - 1)n - 2\alpha+1)x -\alpha^2n^2 + (5\alpha^2 - 3\alpha +
2)n - 10\alpha^2 + 15\alpha - 8=0$ then $G$ has a perfect matching unless
$G=K_1\nabla(K_{n-3}\cup 2K_1)$. This generalizes a result of S. O [Spectral
radius and matchings in graphs, Linear Algebra Appl. 614 (2021) 316--324],
which gives a sufficient condition for the existence of a perfect matching in a
graph in terms of the adjacency spectral radius.
