  Heat engine models are constructed within the framework of massive gravity in
this paper. For the four-dimensional charged black holes in massive gravity, it
is shown that the heat engines have a higher efficiency for the cases $m^2>0$
than for the case $m=0$ when $c_1<0, c_2<0$. Considering a specific example, we
show that the maximum efficiency can reach $0.9219$ while the efficiency for
$m=0$ reads $0.5014$. The existence of graviton mass improves the heat engine
efficiency significantly. The situation is more complicated for the
five-dimensional neutral black holes. Not only the $c_1, c_2, m^2$ exert
influence on the efficiency, but also the constant $c_3$ corresponding to the
third massive potential contributes to the efficiency. When $c_1<0, c_2<0,
c_3<0$, the heat engine efficiency of the cases $m^2>0$ is higher than that of
the case $m=0$. By studying the ratio $\eta/\eta_C$, we also probe how the
massive gravity influences the behavior of the heat engine efficiency
approaching the Carnot efficiency.
