We show that the generalized McVittie spacetime, which represents a black hole with timedependent mass in an expanding universe, is an exact solution of a subclass of the Horndeski family of actions. The heat-flow term responsible for the energy transfer between the black hole and the cosmological background is generated by the higher-order kinetic gravity braiding term, which generalizes the cuscuton action that yields McVittie with constant mass as a solution. Finally, we show that this generalization can be understood in terms of a duality realized by a disformal transformation, connecting the cuscuton field theory to an extension of the Horndeski action which does not propagate any scalar degrees of freedom. Our finding opens a novel window into studies of non-trivial interactions between dark energy/modified gravity theories and astrophysical black holes.