This work describes the preparation, the swelling properties and the potassium diclofenac (KDF) release profile of hydrogels of gum arabic (GA), N′,N′‐dimethylacrylamide, and methacrylic acid. In order to convert GA into a hydrogel, the polysaccharide was vinyl‐modified with glycidyl methacrylate. The hydrogels showed pH‐responsive swelling changes, which were more expressive in the basic environment. Release data of KDF were adjusted to a diffusion‐based kinetic model that provides an important insight on affinity of the drug for hydrogel and solvent, which may be the leading parameter for release of guest molecules from polymers. The KDF release from the hydrogels into simulated intestinal fluid decreases when the amount of modified GA increases. This was demonstrated to be due to the higher affinity of KDF for GA‐richer hydrogel, which makes the anti‐inflammatory release less favorable. The analysis of released drug half‐time (t1/2 = 16.10 and 21.51 h) indicated sustained release characteristics. © 2015 Wiley Periodicals, Inc. J. Appl. Polym. Sci. 2016, 133, 43319.