The electrical switching of antiferromagnet (AFM) is very important for the development of ultrafast magnetic random-access memory (MRAM). This task becomes more difficult in antiferromagnetic oxide NiO, which has complex anisotropy. We show that by utilizing two spin–orbit torques (SOTs) from orthogonal currents, one can deterministically switch the magnetic moments of NiO in two electrical distinguishable states that can be read out using the spin Hall magnetoresistance. This deterministic switching relies on the symmetry of SOT on different sublattices, where the sign reversal of magnetic moments leads to constructive torques in the beginning and balanced torques in the end. In addition, we show that the easy-plane anisotropy plays a key role in the switching, which has been ignored in some previous works. The uniform magnetic dynamics in this work provides a clear physical picture in understanding the SOT switching of NiO. Furthermore, the electrical writing and reading function in our device advances the development of AFM-MRAM.