We study generalized Poincaré inequalities. We prove that if a function satisfies a suitable inequality of Poincaré type, then the Hardy-Littlewood maximal function also obeys a meaningful estimate of similar form. As a by-product, we get a unified approach to proving that the maximal operator is bounded on Sobolev, Lipschitz and BMO spaces.