Northern Gas Networks says the main has undergone several recent repairs and has now been prioritised for replacement.
A spokesperson said: "The old main is being replaced with new, more durable plastic pipes, to ensure a safe and reliable supply of gas to customers now, while getting the network ready to transport alternative greener fuels in the future.
"The work begins on Monday, May 30 and is expected to last for approximately five weeks. It has been planned in collaboration with Calderdale Council.
"So that engineers can carry out the work safely, and to protect the public, some traffic management measures will be introduced."
Works will initially be on Thorne Street, carried out under two-way lights.
A road closure will then be placed on Pellon Lane/Hanson Lane from June 20 for around 10 days.
The spokesperson said: "While the majority of the work will be carried out in the street, engineers will need to access customer properties to complete the project and ensure the continued safe and reliable supply of gas."
Chris Green, Business Operations Lead for Northern Gas Networks (NGN), said: “We would like to apologise in advance for any inconvenience caused during these essential works. However, it is vital we complete them in order continue to maintain a safe and reliable gas supply to the residents of Halifax.
“NGN is continuing to carry out its essential activities while following strict guidelines for safe distance working, where possible, and following good hygiene practices as we continue to live with coronavirus.
“We want to assure residents and road users that we will be working hard to complete this essential scheme as safely and as quickly as possible.”