What does it look like? Is it a full screen ad? Or one of those new sliding lockscreens with a charge indicator?
If you have any app by Go (Go Launcher, GoSMS, etc), Cheetah Mobile (CM Security, CleanMaster, etc), DU (Battery Saver, Battery Doctor, etc), or ES File Explorer, you need to uninstall to remove the ads.
If you are rooted, and you used Kingroot, you need to unroot and remove Kingroot. Use another method to root. Kingroot's root permissions app has ads.