In this paper, we consider the Hermitian \(\{P, k + 1\}\) -(anti-)reflexive solutions to the quaternion matrix equation \(AXB+CXD=E\) and \(AX=E,\) respectively. We use the complex representation method to obtain the necessary and sufficient conditions for the existence of the Hermitian \(\{P, k +1\}\) -reflexive solution (resp. Hermitian \(\{P, k +1\}\) -anti-reflexive solution), respectively, and derive their solutions when the matrix equations have the Hermitian \(\{P, k +1\}\) -reflexive solution (resp. Hermitian \(\{P, k +1\}\) -anti-reflexive solution). Finally, two examples are provided to verify the effectiveness of our method.