First-principles calculations based on density-functional theory in the pseudo-potential approach have been performed for the total energy, crystal structure and cell polarization for SrTaO₂N/SrTiO₃ heterostructures. Different heterojunctions were analyzed in terms of the termination atoms at the interface plane, and periodic or non-periodic stacking in the perpendicular direction. The calculations show that the SrTaO₂N layer is compressed along the ab-plane, while the SrTiO₃ is elongated, thus favoring the formation of P4mm local environment on both sides of the interface, leading to net macroscopic polarization. The analysis of the local polarization as a function of the distance to the interface, for each individual unit cell was found to depend on the presence of a N or an O atom at the interface, and also on the asymmetric and not uniform c-axis deformation due to the induced strain in the ab-plane. The resulting total polarization in the periodic array was ≈ 0.54 C m⁻², which makes this type of arrangement suitable for microelectronic applications.