Passively harmonic mode locking of an erbium-doped fiber laser based on TaSe2 nanosheets saturable absorber (SA) is demonstrated. The TaSe2 nanosheets are prepared by the liquid phase exfoliation technology and deposited onto side surface of a D-shaped fiber to form a fiber-compatible TaSe2 SA. The balanced twin-detector method is utilized to measure nonlinear absorption characterization of the fabricated SA, which gives saturable absorption, nonsaturable absorption, and saturation intensity as 5.49%, 24.6%, and 89.2 MW/cm(2), respectively. Then, TaSe2 SA is inserted into a passively mode-locked erbium-doped fiber laser, and the fiber laser demonstrated with a fundamental frequency of 7.1 MHz. By adjusting the polarization controller and power, harmonic mode-locking operation is realized. As the pump power increases to 380 mw, 128th harmonic mode-locked pulses at 908.8 MHz repetition rate are stably generated. The results confirm that TaSe2 is indeed very desirable photonic material, which can be used in photonics, fiber optic communication, laser material processing and light modulators.