Among composite solid electrolytes, the addition of fillers could restrain the crystallization of the molecular chain of poly(ethylene oxide) (PEO). However, the impact of the spatial distance on the electrochemical properties remains unstudied. This paper uses linear aldehydes with carbon chain lengths of 1 and 7 to synthesize polyaminal-formaldehyde (PAN-FDE) and polyaminal-heptaldehyde (PAN-HDE) with melamine as the filler, which can reduce the crystallinity of the matrix and improve the ionic conductivity. Besides, the ionic conductivity of the PAN-FDE electrolyte membrane can reach 8.433 × 10 −5 S•cm −1 at room temperature by adding 1% PAN-FDE with PEO mass, which increases by 2 orders of magnitude for a poly(ethylene oxide)-lithium trifluoromethanesulfonimide (PEO-LiTFSI) electrolyte membrane. In addition, the electrochemical window of PAN-FDE electrolytes is 0.57 V higher than that of PEO-LiTFSI electrolytes, which can be attributed to the formation of hydrogen bonds between numerous N−H groups in PAN-FDE and ether−oxygen in PEO. In symmetric cells, Li/PAN-FDE/Li cells show a lower initial overpotential of 62 mV and can cycle steadily for 1600 h without a short-circuit, while PEO-LiTFSI cells show a high initial overpotential of 457 mV, and short-circuit occurred at 180 h. In this paper, we contribute another way to optimize the electrochemical properties of composite solid electrolytes by changing the spatial distance.