We discuss a fluid dynamic variant of the classical Bernoulli's brachistochrone problem. The classical brachistochrone for a non-dissipative particle is governed by maximization of the particle's kinetic energy, resulting in a cycloid. We consider a variant where the particle is replaced by a cylinder (bottle) filled with a viscous fluid and attempt to identify the shape of the curve connecting two points along which the bottle would move in the shortest time. We derive the system of integro-differential equations governing system dynamics for a given shape of the curve. Using these equations, we pose the brachistochrone problem by invoking an optimal control formalism and show that (in general) the curve deviates from a cycloid. This is due to the fact that increasing the rate of change of the bottle's kinetic energy is accompanied by increased viscous dissipation. We show that the bottle motion is governed by a balance between the desire to minimize travel time and the need to reach the end point in the face of increased dissipation. The trade-off between these two physical forces plays a vital role in determining the brachistochrone of a fluid-filled cylinder. We show that in the two limits of either vanishing or high viscosity, the brachistochrone for this problem reduces to a cycloid. An intermediate viscosity range is identified where the fluid brachistochrone is non-cycloidal. Finally, we show the relevance of these results to the dynamics of a rolling liquid marble. © 2019 Cambridge University Press.