In this paper we show that Musielak-Orlicz spaces are UMD spaces under the so-called ∆ 2 condition on the generalized Young function and its complemented function. We also prove that if the measure space is divisible, then a Musielak-Orlicz space has the UMD property if and only if it is reflexive. As a consequence we show that reflexive variable Lebesgue spaces L p(·) are UMD spaces.