How old is the IPad. Happened to me and after a stay in Apple intensive care had to get a new one. You could try new plug and cord as these also do fail
Check the charging port for fluff with an opened paper clip and blowing. Failing that the port itself could be damaged, this happens fairly easily if the cable is whacked when inserted.