A £10,000 pot has been set aside by Network Rail to build new setts for badgers along the 35-mile route of the Borders Railway project.
A full-time badger expert has also been drafted in to ensure the badgers are given comfortable new homes, as protecting them is a legal requirment.
Work began on the project last month, with the aim of connecting the Borders region to Edinburgh.
The badgers will be lured to new, specially-made roomy setts with snacks, before their original homes are threatened by the railway works.
Network Rail and wildlife quango Scottish Natural Heritage (SNH) are also rehousing owls who may be displaced by the work, and plans are in place to minimise disruption for otters and bats.
The new setts will be up to a metre underground and will have a network of tunnels and chambers.
SNH licensing manager Ben Ross said: “Each sett can vary in size and the number of badgers it contains so depending on factors such as these, each artificial sett could cost between £200-£300 and £1000 to construct.
“Relocations such as this are quite common when large capital projects are being built. It basically involves digging a large hole and then constructing a series of tunnels and chambers using railway sleepers and large pipes.
“Badgers are creatures of habit and use the same paths to get about at night so the likelihood is that if you build a new sett, they will inevitably investigate it.
“You’d think that they would reject the idea and look to return to their own original sett, but if the sett is built correctly and offers more room, then the badgers seem very happy to take up residence.”
Laws protecting carnivores mean work cannot take place within 30metres of a known sett, and SNH has to be asked for approval to move it.
A Network Rail spokesman said: “We are committed to delivering the new railway with the minimum of disturbance to wildlife along the line of route.
“We have plans in place for a range of environmental factors, including the temporary rehoming of badgers, and are liaising with Scottish Natural Heritage to make sure we work around important habitats and protected species or plants as sensitively as possible.”
The £300million scheme will see seven new stations created, and trains are due to run on the line in 2015.