Get a Root Fossil in the desert and talk to a scientist on the second floor of Devon Corp., (he says it will take a while, but just leave the room and go right back in)and he will gve you a Lv. 20 Lileep.
Chat with our AI personalities
It evolves at level 40.
Beat the elite four after having seen all 150 of the diamond/pearl Pokemon, then you will receive the national dex. From there, the fossils of the two can be found underground in the walls- take them to the Oreburgh museum to revive Lileep and Anorith.In Pokemon emerald only one may be selected.
at 40 lvl
To get a Lileep in Pokemon Ruby, Sapphire and Emerald you need to revive a Root Fossil. The Root Fossil can be found on Route 111 however choosing it will cost you the ability to get the Claw Fossil. Alternatively you can trade for a Lileep from another game if you've picked the Claw Fossil.
It evolves at level 40 so just keep leveling your lileep!