“Needs must, when the devil comes calling,”
This is an old proverb and the language is a bit archiaic. Another form, used in Shakespeare, is "He must needs go that the devil drives”.
So it is "drive" like driving (urging on) a team of oxen, not driving a car.
So the expression means "compelled to do what the devil urges".