We investigated ion exchange processes in poly(L-glutamic acid)/poly(allylamine)hydrochloride (PGA/PAH) polyelectrolyte multilayers containing ferrocyanide using electrochemical quartz crystal microbalance and infrared spectroscopy in attenuated total reflection. Oxidation/reduction of the ferrocyanide caused a reversible swelling of the film. We showed that the electrochemical swelling of this multilayer system depends on the ionic properties of the contacting buffer. A model was developed to explain the influence of ionic strength, the pH value, and the charge of the counterions in the buffer on the swelling behavior, by relating the swelling of the multilayer to the exchange of counterions and water molecules between the buffer and the multilayer. Changing the salts in the buffer, while maintaining the same ionic strength, showed that the swelling of the multilayer is related to the counterions' molecular mass, hydration properties, and binding strength to PAH. The hydration efficiency of different monovalent anions follows the Hofmeister series, decreasing from kosmotropic ions to chaotropic ones. In contrast, the strong binding affinity of divalent anions causes them to diverge from the Hofmeister series and to release ferrocyanide from the multilayer.