We derive an equation of state (EOS) for magnetized charge-neutral nuclear matter relevant for a neutron star (NS). The calculations are performed within an effective chiral model based on the generalization of the σ model with nonlinear self-interactions of the σ mesons along with the ρ−σ cross-coupling term. This model is extended by introducing the contributions of a strong magnetic field on the charged particles. The contributions arising from the effects of the magnetic field on the Dirac sea of charged baryons are also included. The resulting EOS for the magnetized dense matter is used to investigate the NS properties like its mass, radius, and tidal deformability. The magnitude of the magnetic field at the core of the NS considered here is in the range of 1015–1018 G, for which the relative deformation from spherical symmetry turns out to be less than 1%, giving a post facto justification for the spherically symmetric treatment of the NS structure. The dimensionless tidal deformability Λ1.4 is 526 for an NS with mass 1.4 M ⊙, which is consistent with the recent observation of GW 170817. The maximum mass of the NS in the presence of a strong magnetic field is consistent with the observational constraints on the mass of the pulsar PSR J0348–0432, and its radius at a mass of 1.4 M ⊙ is also in agreement with the empirical bounds.