The shuttling of polysulfides between electrodes in lithium-sulfur (Li-S) batteries significantly impairs cycle stability. This study explores the use of melamine-based nanoscale porous organic frameworks (POFs) as polysulfide reservoirs to modify glass fiber (GF) separators. Melamine was reacted with dibromoalkanes of varying carbon chain lengths (n = 4, 8, and 12) to produce a series of POF materials, POF-Cn, with different nanoscale pore sizes and solubilities. The POF composites, POF-Cn/SP/PVP, which include conductive carbon Super P (SP) and a polyvinylpyrrolidone (PVP) binder, were coated onto GF membranes to create modified separators for Li-S batteries. Batteries with these modified GF separators exhibited higher initial capacities, improved rate performance, and better long-term cycle stability compared to those with non-modified separators. Among the POF composites, POF-C8/SP/PVP exhibited the best performance, with an initial specific capacity of 1392 mAh g-1 at 0.1C and a high capacity retention of 90% after 300 cycles at 0.5C. The enhanced capacity, stability, and rate performance are attributed to the nanoporous structure of POF-C8 and its high nitrogen content, which effectively traps soluble LiPSs and reduces their diffusion toward the Li anode. The good solubility of POF-C8 facilitates uniform dispersion in the modifying layer, promoting efficient polysulfide trapping and maximizing their utilization in electrochemical reactions, aided by the conductive SP in the composite.