In this paper we investigate a novel connection between the effective theory of M2-branes on (C 2 /Z 2 ×C 2 /Z 2 )/Z k and the q-deformed Painlevé equations, by proposing that the grand canonical partition function of the corresponding four-nodes circular quiver N = 4 Chern-Simons matter theory solves the q-Painlevé VI equation. We analyse how this describes the moduli space of the topological string on local dP 5 and, via geometric engineering, five dimensional N f = 4 SU(2) N = 1 gauge theory on a circle. The results we find extend the known relation between ABJM theory, q-Painlevé III 3 , and topological strings on local P 1 × P 1 . From the mathematical viewpoint the quiver Chern-Simons theory provides a conjectural Fredholm determinant realisation of the q-Painlevé VI τ -function. We provide evidence for this proposal by analytic and numerical checks and discuss in detail the successive decoupling limits down to N f = 0, corresponding to q-Painlevé III 3 . * bonelli(at)sissa.it † fgloblek(at)sissa.it ‡ naotaka.kubo(at)yukawa.kyoto-u.ac.jp § nosaka(at)yukawa.kyoto-u.ac.jp ¶ tanzini(at)sissa.it