Never contend with a Man who has nothing to Lose.

[No empeñarse con quien no tiene qué perder.]

Baltasar Gracián y Morales (1601-1658) Spanish Jesuit priest, writer, philosopher
The Art of Worldly Wisdom [Oráculo Manual y Arte de Prudencia], § 172 (1647) [tr. Jacobs (1892)]
    (Source)

(Source (Spanish)). Alternate translations:

Never to engage with him that hath nothing to lose.
[Flesher ed. (1685)]

Do not engage with him who has nothing to lose.
[tr. Fischer (1937)]

Never compete with someone who has nothing to lose.
[tr. Maurer (1992)]