We performed J- and R-band linear polarimetry with the 4.2 m William Herschel Telescope at the Observatorio del Roque de los Muchachos and with the 1.6 m telescope at the Observatorio do Pico dos Dias, respectively, to derive the magnetic field geometry of the diffuse molecular cloud surrounding the embedded protostellar system NGC 1333 IRAS 4A. We obtained interstellar polarization data for about two dozen stars. The distribution of polarization position angles has low dispersion and suggests the existence of an ordered magnetic field component at physical scales larger than the protostar. Some of the observed stars present intrinsic polarization and evidence of being young stellar objects. The estimated mean orientation of the interstellar magnetic field as derived from these data is almost perpendicular to the main direction of the magnetic field associated with the dense molecular envelope around IRAS 4A. Since the distribution of the CO emission in NGC 1333 indicates that the diffuse molecular gas has a multi-layered structure, we suggest that the observed polarization position angles are caused by the superposed projection along the line of sight of different magnetic field components.