The Qing government had sent the Mongol General Sengge Rinchen, who had recently crushed a large Taiping army, to defeat the Nien, a collection of loosely affiliated gangs or groups in opposition to Qing rule, in early 1856.
Sengge Rinchen's army had captured several fortified cities in northern China and destroyed most of the Nien infantry, and killed Nien leader Zhang Lexing himself in an ambush.
The bulk of the Nien cavalry remains intact, however, and the Nien had soon reorganized.
In late 1864, the Nien movement gains new life as Taiping commanders Lai Wenguang and Fan Ruzeng arrive to take control of the Nien forces; those Taiping soldiers not defeated in the fall of the Taiping capital at Nanking join them.
The Nien begin to adopt guerrilla hit-and-run tactics, using mobile mounted units to strike at the weak points of the Qing armies and then retreating into strategic hamlets .
Sengge Rinchen's infantry-based army cannot stop the fast moving cavalry from devastating the countryside and launching surprise attacks on Imperial troops.
Seven thousand soldiers are transported to Tianjin via Shanghai to battle the Nien.