We fabricated flat-sheet and hollow fiber membranes from polyethersulfone (PES) solutions in two ionic liquids: 1-ethyl-3-methylimidazolium diethyl phosphate ([EMIM]DEP) and 1,3-dimethylimidazolium dimethyl phosphate ([MMIM]DMP). The solvents are non-volatile and less toxic than organic solvents, such as dimethylformamide (DMF). The membranes morphologies were compared with those of membranes prepared from solutions in DMF, using electron microscopy. Water permeance, solute rejection and mechanical strengths were evaluated. Membranes were applied to DNA separation. While membranes based on PES were successfully prepared, polysulfone (PSf) does not dissolve in the same ionic liquids. The discrepancy between PES and PSf could not be explained using classical Flory-Huggins theory, which does not consider the coulombic contributions in ionic liquids. The differences in solubility could be understood, by applying density functional theory to estimate the interaction energy between the different polymers and solvents. The theoretical results were supported by experimental measurements of intrinsic viscosity and dynamic light scattering (DLS).