British Transport Police Lancashire said the device was spotted at a shop in Morecambe before being handed in to the local police station on Thursday January 27.
National Rail Incident Response were called to attend the station and collect the detonator.
A railway detonator is a small explosive device which is strapped to a railway line to warn train drivers not to proceed onto a line which has been closed due to an obstruction or hazard.
When a train passes over the device it explodes, emitting a loud bang which signals the driver to make an emergency stop.
BTP Lancashire said the device was made in around 1945 and had an expiry date of July 1950.
A spokesman said on social media: "A railway detonator was handed in to @MorecambePolice Station yesterday after it had been found at a charity shop in #Morecambe.
"Detonators are used on the railway as an emergency warning device.
"Network Rail Incident Response attended and collected the detonator.
"They did a bit of research and from the markings on it established this one was probably made around 1945.
"They have a 5-year expiry date for use, and this one had July 1950 on it."