We derive the effective single-band Hamiltonian in the flat NiO2 planes for nickelate compounds Nd1−xSrxNiO2. We first implement the first-principles calculation to study electronic structures of nickelates using the Heyd-Scuseria-Ernzerhof hybrid density functional and derive a three-band Hubbard model for Ni-O pdσ bands of Ni+3dx2−y2 and O2−2px/y orbitals in the NiO2 planes. To obtain the effective one-band t-t′-J model Hamiltonian, we perform the exact diagonalization of the three-band Hubbard model for the Ni5O16 cluster and map the low-energy spectra onto the effective one-band models. We find that the undoped NiO2 plane is a Hubbard Mott insulator, and the doped holes primarily locate on Ni sites. The physics of the NiO2 plane is a doped Mott insulator, described by the one-band t-t′-J model with t=265~meV, t′=−21~meV and J=28.6~meV. We also discuss the electronic structure for the "self-doping" effect and heavy fermion behavior of electron pockets of Nd3+5d character in Nd1−xSrxNiO2.