A group of new polyimides (PIs) containing xanthene bulky groups and heterocyclic pyridine ring were synthesized by polycondensation reaction by using new symmetric and asymmetric diamines with available dianhydrides. The prepared diamines and PIs were characterized by Fourier transform infrared, elemental analysis, and proton nuclear magnetic resonance spectroscopy and carbon nuclear magnetic resonance spectroscopy. The PIs have desirable solubility in common aprotic solvents like dimethyl sulfoxide, N-methyl-2-pyrrolidone, dimethylacetamide, and pyridine as a less polar solvent. The PIs with inherent viscosities in the range of 0.51–0.72 dL/g were amorphous in nature, showed glass transition temperatures (Tgs) of about 270–300°C, and 10% weight loss at temperatures 384–443°C. They showed fluorescence emission (quantum yield 7–12%) due to the presence of xanthene and pyridine groups in their structure. The prepared PIs showed tensile strength of 81–91 MPa with elongation at break of 19–23%. The antibacterial properties of the PIs against Gram negative and Gram positive bacteria and funguses were investigated. Also, a membrane of PI prepared by electrospinning method was used for the removal of different concentrations of Cr(VI) from aqueous solutions.