The invention discloses a multifunctional direct expansion type energy recovery and fresh air ventilation all-in-one unit and a control method. The multifunctional direct expansion type energy recovery and fresh air ventilation all-in-one unit comprises a dirty air channel, a fresh air channel, a refrigerant compression loop, an economizer, a dirty air heat exchange loop and a fresh air heat exchange loop. The multifunctional direct expansion type energy recovery and fresh air ventilation all-in-one unit is suitable for places such as precision machine rooms, laboratories, operating rooms, sterile rooms, data centers and the like which require high environmental levels, and has the free combination of multiple functions such as dirty air removal, fresh air conveying, temperature control, humidity control, air filtration, air sterilization, peculiar smell elimination, air purification, deep energy recovery and the like, and different functional requirements are met, and energy is saved.