Non-volatile memory (NVM) will play a very important role in the next-generation digital technologies, including the Internet of things. The metal-oxide memristors, especially based on HfO
2
, have been favored by lots of researchers because of its simple structure, high integration, fast operation speed, low power consumption, and high compatibility with advanced (complementary metal oxide silicon) CMOS technologies. In this paper, a 20-level stable resistance states Al-doped HfO
2
-based memristor is presented. Its cycles endurance, data retention time, and resistance ratio are larger than 10
3
, > 10
4
s, and > 10, respectively.