I got fired because I slacked off at work.

Literal

Work [object-を] skipped [because-から] neck became.

Casual speech. サボる ('to skip work/class, to slack off') is a loan-verb formed from French 'sabotage' + る — an example of how Japanese verbalizes loanwords by adding る. クビになる ('to be fired') is an idiom literally 'to become (one with) a neck' — from the 'neck-cutting' metaphor for dismissal, or the old practice of crossing out a fired employee's name.