This paper proposes an optimal beamforming strategy for a downlink multi-user multi-input–multi-output (MIMO) dual-function radar communication (DFRC) system with dirty paper coding (DPC) adopted at the transmitter. We aim to achieve the maximum weighted sum rate of communicating users while adhering to a predetermined transmit covariance constraint for radar performance assurance. To make the intended problem trackable, we leverage the equivalence of the weighted sum rate and the weighted minimum mean squared error (MMSE) to reframe the issue and devise a block coordinate descent (BCD) approach to iteratively calculate transmit and receive beamforming solutions. Through this methodology, we demonstrate that the optimal receive beamforming aligns with the traditional MMSE approach, whereas the optimal transmit beamforming design can be cast into a quadratic optimization problem defined on a complex Stiefel manifold. Based on the majorization–minimization (MM) method, an iterative algorithm is then developed to compute the optimal transmit beamforming design by solving a series of orthogonal Procrustes problems (OPPs) that admit closed-form optimal solutions. Numerical findings serve to validate the efficacy of our scheme. It is demonstrated that our approach can achieve at least 73% higher spectral efficiency than the existing methods in a high signal-to-noise ratio (SNR) regime.