A determination of the three-dimensional spin directions in all types of domain walls (DWs) of antiferromagnetic NiO has been successfully performed by photoemission electron microscopy combined with x-ray magnetic linear dichroism (XMLD), both for sand p-polarized light. By comparing the azimuthal angle dependence of the XMLD contrast in the DWs with cluster model calculations which include the crystal symmetry and full-multiplet splitting, we determine the spin structures in the {001} T walls, {011} T walls, 120 • S walls, and 180 • S walls. In some cases, distinct S walls are not formed between two adjacent S domains, and the spin direction changes gradually over a wide range of the S domain structures. In the S walls, the spin direction is parallel to the magnetic easy {111} plane. These spin configurations arise from the large difference in anisotropy energy between the in-plane and out-of-plane directions. Unexpectedly large widths in the several hundred nanometer range were observed for all the DWs. This also shows that NiO has a small magnetocrystalline anisotropy energy. Together with Monte Carlo simulation results, the qualitative phenomena concerning the wall energies are discussed. We further investigated the difference in wall energy between the {001} T wall and the {011} T wall. From the Monte Carlo simulation and an experimental study of heating effects, it is revealed that the {001} T wall energy is smaller than the {011} T wall energy.