The present invention relates to nanoparticle composition comprising cellulose nanofibers embedded with nanosized material. More particularly the present invention relates to cellulose nanofibers embedded with silver or iron oxide embedded silver. In addition the present invention is also related to the preparation of the cellulose nanofibers embedded with nanosized material. The nanoparticle composition is antibacterial in nature and can be utilized in various antibacterial applications.