Clear an area of remaining enemy troops after a victory, as in They left behind just one squadron to mop up. [c. 1900]
Perform the minor tasks that conclude a project or activity, as in Go ahead, I'll mop up these last invoices. [First half of 1900s] Both usages transfer the task of housecleaning with a mop to other kinds of cleanup.