Stable and efficient self-mode locking in a Q-switched highly doped erbium fiber laser has been demonstrated. The proposed mechanism of the pulse formation based on self-phase modulation agrees well with the observed pulse characteristics.