To egg someone on is to encourage them and urge them forward.
This little term has nothing to do with bird's eggs. Nor is it connected with the phrase that employs the other common usage of 'egg' as a verb, that is, 'over-egg the pudding'. The 'egg' of 'egg on' is a straightforward variant of 'edge', so to 'egg someone on' is to edge, or urge, them forward. Egg and edge both have the look and feel of Viking words and this first impressions turns out to be correct, as they both derive from the Old Norse 'eddja'.
Egg has been used as a verb in English since around the 13th century and appears in print in the Trinity College Homer, in the form of 'eggede', circa 1200.
To 'egg on' appears later. It is used in Thomas Drant's translation of Horace - Horace his arte of poetrie, pistles and satyrs englished, 1566:
"Ile egge them on to speake some thyng, whiche spoken may repent them."