Around 209, when the warlord Liu Bei took charge of Jing Province (covering present-day Hubei and Hunan) after the death of its Inspector (), Liu Qi, he recruited Ma Liang to serve as an Assistant Officer () under him. Later in 211, when Liu Bei left Jing Province for an expedition in Yi Province (covering present-day Sichuan and Chongqing), Ma Liang remained behind in Jing Province. Ma Liang was a close friend of Liu Bei's strategist Zhuge Liang and they were sworn brothers.