Lard. Not recommended anymore for obvious reasons, since if you cut yourself and the fat gets in the cut and is full of bacteria, well you get the idea. Later on they made shaving soaps, you work them into a lather with water, less bacterial contamination risk, not that anyone knew that, they just noticed that if you got cuts you did not get all infected and dead like you did slathering rendered animal fat on your face and shaving.
People have likely been shaving since the discovery of the earliest sharp tools, like splintered flint rocks napped to have a decent edge. Of course human hair is tough enough that even special hardened razor sharp steel still goes dull quickly running across stubble.