Sodium titanate Na2Ti3O7(NTO) has superior electrochemical properties as an anode material in sodium-ion batteries (SIBs), and Nb or V doping is suggested to enhance the electrode performance. In this work, we carry out systematic first-principles calculations of the structural, electronic and electrochemical properties of NTO and Na2Ti2.75M0.25O7(M = Nb, V), using supercells to reveal the effect of Nb or V NTO-doping on its anode performance. It is found that Nb doping gives rise to the expansion of cell volume but V doping induces the shrinkage of cell volume due to the larger and smaller ionic radius of the Nb and V ions, respectively, compared to that of the Ti ion. We perform structural optimization of the intermediate phases of Na2+xM3O7with increasing Na contentxfrom 0 to 2, revealing that the overall relative volume expansion rate is slightly increased by Nb and V doping but remains lower than 3%. Our calculations demonstrate that the electrode potential of NTO is slightly raised and the specific capacity is reduced, but the electronic and ionic conductivities are improved by Nb or V doping. With the revealed understanding and mechanisms, our work will contribute to the search for advanced electrode materials for SIBs.