This work focuses on the correction of both the coecient and the right hand side matrices of the inconsistent matrix equations $AX = B$ and $XC = D$ with orthogonal constraint. By optimal correction approach, a general representation of the orthogonal solution is obtained. This method is tested on two examples to show that the optimal correction is eective and highly accurate.