While both words mean to work hard, toil suggests exhausting physical labor and moil dull and menial labor; moil can also mean confusion or turmoil, as in The moil of his thoughts is tearing him apart. Used together, the idiom toil and moil refers to dull and laborious work.
There are strange things done in the midnight sun
By the men who moil for gold . . .