Linear polyethylenimine (L-PEI) has numerous applications, such as in pharmaceutical formulations, gene delivery, and water treatment. However, due to the presence of secondary amine groups, L-PEI shows a relatively high toxicity and low biocompatibility. Here, various organic anhydrides were used to modify L-PEI to reduce its toxicity and enhance its functionality. We selected methacrylic anhydride, crotonic anhydride, maleic anhydride, and succinic anhydride to modify L-PEI. The structure of the resulting derivatives was characterized using 1 H NMR and FTIR spectroscopies, and their behavior in aqueous solutions was studied using turbidimetric and electrophoretic mobility measurements over a broad range of pHs. A fluorescence flow through method determined the mucoadhesive properties of the polymers to the bovine palpebral conjunctiva. Methacrylated L-PEI and crotonylated L-PEI showed strong mucoadhesive properties at pH 7.4, likely due to covalent bonding with mucin thiol groups. In contrast, maleylated and succinylated L-PEI were poorly mucoadhesive as the pH was above their isoelectric point, resulting in electrostatic repulsion between the polymers and mucin. The toxicity of these polymers was evaluated using in vivo assays with planaria and the 3-(4,5-dimethylthiazol-2-yl)-2,5-diphenyl-2H-tetrazolium bromide (MTT) cell viability assay in human alveolar epithelial cells. Moreover, the irritancy of polymers was assessed using a slug mucosa irritation assay. The results demonstrated that anhydride modification mitigated the adverse toxicity effects seen for parent L-PEI.