Polybenzimidazole (PBI), a polymer known for its superior chemical stability, thermal properties, and mechanical resistance has been regarded as a suitable membrane material for a wide range of applications. Herein, we took advantage of these properties and its amphoteric nature that could endow the formed membranes with capabilities to have different states and responses in different pH conditions for enhanced nanofiltration (NF) performance. Integrally skinned asymmetric flat-sheet PBI membranes were fabricated using the nonsolvent-induced phase separation (NIPS) method under various pH in a coagulant bath. For the first time, we have thoroughly investigated the effects of nonsolvent acidity and alkalinity on PBI membrane formation and their performances. It was revealed that the membrane formed under pH 12 showed a doubled MgCl2 rejection than the one formed under pH 7. Moreover, a green modification method was employed to enhance the membranes’ sieving capabilities by using hyperbranched polyethyleneimine polymers (HPEIs) with different molecular weights (MWs). The PBI membrane formed under pH 12 and then surface modified with a HPEI of MW = 25,000 g/mol (i.e., PBI 12–25K membrane) has a molecular weight cut-off (MWCO) as low as 288 Da and an MgCl2 rejection more than 97%. The membrane also displays pH-responsive characteristics for salt separation with unequal valence ratios of co-ions and counter-ions. It is able to show a competitive SLi,Mg value for Li+/Mg2+ separation surpassing the state-of-the-art performance of commercial membranes.