The equilibrium distribution of a polymer chain between two interconnected spherical cavities (a small one with radius R
s and a large one with radius R
l) is studied by using Monte Carlo simulation. A conformational transition from a double-cavity-occupation (DCO) state to a single-cavity-occupation (SCO) state is observed. The dependence of the critical radius of the small cavity (R
sC) where the transition occurs on R
l and the polymer length N can be described by
R
sC
∝
N
1
/
3
R
l
1
−
1
/
3
ν
with ν being the Flory exponent, and meanwhile the equilibrium number (m
s) of monomers in the small cavity for the DCO phase can be expressed as m
s = N/((R
l/R
s)3 + 1), which can be quantitatively understood by using the blob picture. Moreover, in the SCO phase, the polymer is found to prefer staying in the large cavity.