The invention discloses a preparation method and application of a quaternary ammonium salt-N-halamine type nano-antibacterial fiber. After the natural fiber is activated and pretreated, it is grafted with a polyamino polymer compound or a polyamino polymercapto polymer compound. After being grafted with a quaternary ammonium salt, crosslinking is carried out by a crosslinking agent, and the quaternary ammonium salt-N-halamine type nano antibacterial fiber of the present invention is obtained after bleaching; the nano antibacterial fiber of the present invention has both contact type and release type. The antibacterial function of the functional group greatly speeds up the sterilization speed, and it can also be sterilized under normal temperature and pressure. It has strong antibacterial property, long-lasting effect, and is not easy to produce drug resistance. The fiber antibacterial material can be made into medical supplies, such as cotton swabs, cotton Balls, gauze, masks, surgical gowns, etc., can be widely used in food packaging, food preservation, medical equipment, public health, water purification systems and many other fields, and have broad application prospects.