During the aftermath of the Disaster of Yongjia in northern China, Chen An became a favored general of the Jin prince Sima Bao in Qinzhou, but an assassination attempt on him made by one of Bao's subordinates in 315 prompted him to declare independence in Longcheng (隴城, in modern Qin'an County, Gansu).
During this time, he read the Book of Wei and gained an admiration for the Cao Wei military general, Xu Chu, so much so that he decided to change his courtesy name to Huhou (虎侯; meaning "Tiger Marquis", one of Xu Chu's nicknames).
[2] After the War of the Eight Princes broke out in Jin, Chen An took the opportunity to establish ties with the ruling Sima family.
Chen An fled to Qinzhou and submitted to Mo's son, Sima Bao, who was serving as the provincial inspector at the time.
He and another minor warlord named Jiao Song (焦嵩) invaded Sima Bao's territory in Longshi together with the Han general Liu Yao.
Chen An and Jiao Song carried on their assault into the following year in 318, when they were now threatening Sima Bao's capital of Shanggui.
[8] Sima Bao was killed by his subordinates Yang Ci (楊次) and Zhang Chun in c.July 320 over numerous disagreements (another source states he died of illness[9]).
Chen An beheaded Yang Ci before Sima Bao's coffin as a sacrifice and later buried his former lord at Shanggui.
He then carried out funeral rites similar to the one of the Son of Heaven and posthumously named Sima Bao "Prince Yuan".
Although he forced Chouchi into submission, a plague had struck his army, and Liu Yao himself became deathly ill.
Chen An ambushed and captured him but later invited him to join his army, still believing that Liu Yao had passed.
Before he died, Lu Ping told him, "After you've cut off my head, hang it up in the marketplace at Shanggui, so I can watch Zhao behead Chen An in turn!"
Liu Yao heard of Lu Ping's death and thought that Chen An's inability to gather talents will be his downfall.
He was greatly routed as enemy reinforcements led by Shi Wu (石武) arrived to assist Liu Gong.
In autumn, Liu Yao personally led an army to attack Longcheng while sending another to subjugate Shanggui.
[14] Chen An left his generals Yang Bozhi (楊伯支) and Jiang Chong'er (姜沖兒) to defend Longcheng while he led his elite cavalry to break through and flee to Xiazhong (陜中; south of present-day Qin'an County, Gansu).
After he was killed, the people of Longshang were saddened, and decided to compose a song in honor of his recent death called "Ode to a Stalwart Warrior (壯士之歌)".