Using the spin-polarized relativistic Korringa-Kohn-Rostoker method, we study the electronic and magnetic properties of Fe2NiAs compound with the Hg2CuTi structure. Electronic calculations reveal the d-d orbital hybridization taking an important role in the compound. The calculated magnetic moments, which contain the spin and orbital moments, are primarily carried by Fe atoms located in A and B sites. The orbital moment of Fe2NiAs system is rather small due to the cause of orbital quenching, implying a weak spin-orbit coupling. Simultaneously, we also study the influence of lattice constant on the magnetic moment, it is found that both spin and orbital moments are sensitive to the changes of lattice constants, i.e., the moments become larger as the expansion of lattice constant, indicating the enhancement of spin-orbit coupling effect. In addition, we investigate the magnetic interactions between the constituents to obtain the Heisenberg exchange coupling parameters. It is noted that the interactions are dominated by a strong exchange between Fe atoms. Finally, we acquire the Curie temperatures of Fe2NiAs compound under different lattice constants by using mean field approximation.