In the conventional two-way relay nonorthogonal multiple access (TWR-NOMA) system, its diversity order is equal to zero even under the perfect successive interference cancellation (pSIC). In this article, we leverage multiple-input–multiple-output (MIMO) technique in the TWR-NOMA system to extract spatial diversity gain for the performance enhancement. Communications between two user pairs are assisted by a relay. Precoding vectors at users as well as the matrix at the relay are specially designed to perform the signal alignment (SA). We derive analytical closed-form expressions for the outage probability and diversity order with both pSIC and imperfect successive interference cancellation (ipSIC). In addition, the ergodic rate and ergodic sum rate are analyzed. Optimal power allocations for the system outage probability and ergodic sum rate are analyzed based on the quality of service. Simulation results are provided to confirm the derived analytical results. The results show that the combination of SA and TWR-NOMA can decrease the outage probability and improve the diversity order effectively. The ergodic rates finally arise ceilings with both pSIC and ipSIC, and the ergodic sum rate can keep increasing as the power allocated to the distant user increases. However, the conventional TWR-NOMA is complete opposite. In summary, compared to TWR-NOMA, TWR-NOMA-SA has higher diversity order and enables distant users to contribute more to system performance.