  In this paper, we study the heat engine where charged AdS black holes
surrounded by dark energy is the working substance and the mechanical work is
done via $PdV$ term in the first law of black hole thermodynamics in the
extended phase space. We first investigate the effects of a kind of dark energy
(quintessence field in this paper) on the efficiency of the RN-AdS black holes
as heat engine defined as a rectangle closed path in the $P-V$ plane. We get
the exact efficiency formula and find that quintessence field can improve the
heat engine efficiency which will increase as the field density $\rho_q$ grows.
At some fixed parameters, we find that bigger volume difference between the
smaller black holes($V_1$) and the bigger black holes($V_2$ ) will lead to a
lower efficiency, while the bigger pressure difference $P_1-P_4$ will make the
efficiency higher but it is always smaller than 1 and will never be beyond
Carnot efficiency which is the maximum value of the efficiency constrained by
thermodynamics laws, this is consistent to the heat engine in traditional
thermodynamics. After making some special choices for thermodynamical
quantities, we find that the increase of electric charge $Q$ and normalization
factor $a$ can also promote heat engine efficiency which would infinitely
approach the Carnot limit when $Q$ or $a$ goes to infinity.
