Two solvent-induced porous hydrogen-bonded organic frameworks have been obtained, and their synthesis, crystal structures, gas sorption behaviours and fluorescence sensing applications have been systematically investigated to elucidate the solvent effects on the structures and functionalities of HOFs.