Opposing fans will be sent home from the Scottish cup final on separate trains.
The supporters of the winning team will travel on the service via Airdrie and Bathgate with the losing team’s fans going home via Falkirk High.
An alcohol ban will also be in place on trains for most of the day to try and limit any trouble.
On Thursday, ScotRail announced their plans for the game on May 19. They will be putting extra carriages on services between Edinburgh and Glasgow with an extra 11,000 seats provided.
The trains with extra seats will run on the line to Glasgow Central via Shotts, as well as the two Glasgow Queen Street routes via Falkirk High and Bathgate. Extra carriages will also be put on the trains from Glasgow Central to Mount Florida and Kings Park, near Hampden.
On the way to the game, fans will be asked to queue at Waverley and Haymarket, with staff directing them onto the first available train to Glasgow. Once at Glasgow Central, they will also be asked to queue.
There will be one queue for Hearts fans and another for Hibs, with supporters of Hearts using Mount Florida and Hibs using Kings Park to get to the football ground.
Alcohol will be banned on all trains between Edinburgh and Glasgow from 9am to 1pm, trains from Glasgow Central to Mount Florida and Kings Park from 12pm to 3pm and 5pm and 9pm and on Glasgow to Edinburgh trains from 5pm to 9pm.
Steve Montgomery, ScotRail’s managing director, said: "We are ready to welcome thousands of extra passengers on board for what is an extraordinary occasion.
"Our plans ensure that we will accommodate as many fans as possible. We want them to have a great day out at Hampden, the first time the teams have met in a Scottish Cup Final since 1896."
The British Transport Police said they would be patrolling the trains and stations to make sure everyone has a safe journey.
Chief Superintendent Ellie Bird said: "British Transport Police will have additional resources across the rail network to reassure those travelling to the match, or not.
"The spectacle of an all-Edinburgh Scottish Cup Final is an exciting prospect which both sets of supporters will be looking forward to.
"BTP has planned meticulously with our rail industry partners and police colleagues to make sure the day is as memorable as it promises to be, and other passengers, who may not be going to Hampden, and rail staff are not disrupted or inconvenienced."
More About Scottish Cup Final 2012
- Doors Open Day 2012: Thousands access city’s secret places
- Doors Open Day: Return to the 1950s or ride in a bus wash [Video]
- Hearts and Hibs fans set the bar for nationwide fixtures
- Hibernian boss Pat Fenlon handed four game ban for cup final incident
- Triumph and tragedy: Fans' views of the salt and sauce final [Video]
- Hearts and Hibs fans praised by police after cup final weekend
- Dejected Dougray Scott can’t understand Hibs’ attitude in cup final
People who read this story also read
- Craig Whyte 'offered £15m to pay Rangers tax case from personal wealth'
- Rangers crisis: Blue Knights claim Ibrox club has 'run out of time'
- Rangers owner Craig Whyte agrees to sell his 85% shareholding in club
- Couple scoops £850,000 after matching six balls on the lottery
- Explosion after thief cuts through live electrical cable