The invention relates to self-assembled nanofibers of chitosan and bioactive compounds for use as nutraceuticals or drugs. Suitable bioactive compounds include molecules of a low molecular size with acid or lactone groups, aromatic rings and hydroxyls. The nanofibers are absorbed, without degradation, in the small intestine, containing and protecting the bioactive compounds until they reach target organs. The nanofibers also cross the blood-brain barrier, allowing the compounds to reach the brain where they act as a controlled release system. If the bioactive compounds are neuroprotectors, the nanofibers can treat or prevent neurodegenerative diseases, strokes and other diseases related to aging or associated with oxidative stress. The invention also relates to a method for obtaining the nanofibers involving mixing chitosan with the bioactive compounds and allowing self-assembly. The invention further relates to a dosage form containing the nanofibers, particularly for oral administration.