The mode-locked lasers based on nonlinear polarization rotation (NPR) are applied in many fields such as optical communication, precision metrology and material processing due to simple structure, low cost and versatile states. In this paper, a compact Erbium-doped all-fiber mode-locked laser based on NPR is presented. The ring laser cavity consists of only a single in-line integrated device. The repetition of the laser is ~209MHz with 50 nm spectrum width and 236 fs pulse width. The laser can be utilized in the fields of precision measurement, optical sensing, optical communication, material processing and medical imaging.