Explaining Stagflation High demand for goods drives up prices, and also encourages firms to hire more; and likewise high employment raises demand. 
Then why stagflation?
According to above explanation,  it should not exist.
For a long time many people thought that stagnation was an impossible economic experience to occur as Keynes economic theory of the Philipps curve which portrayed macroeconomic policy as a trade-off between unemployment and inflation.   However during the 1960s in UK and in 1970s in the US stagnation occurred but was due to external situations which caused prices to increase. U.S. and other industrialized countries entered a period of slow economic growth occurring simultaneously with high rates of inflation.

https://www.investopedia.com/articles/economics/08/1970-stagflation.asp

It appears, which Neo-Keynesians are believing, that stagflation is caused by cost-push inflation (when some force or condition increases the cost of production). So external factors such as a shortage of natural resources or an act of war are the main contributors to this situation.