The Board of Supervisors approved an agreement with Patriot Rail, which plans to expand the number of goods going in and out of the San Joaquin Valley.
The rail district will be located at the Castle Commerce Center.
The county says it will enhance the ability of agricultural producers, manufacturers and other businesses to ship and receive products using the Burlington-Northern Santa Fe railroad mainline.
It currently runs adjacent to the site and will be expanded.
Merced County leaders believe this will make it easier for local businesses to expand their own operations.
They say rail jobs will come out of the agreement, and Patriot Rail also plans to build warehouses.
"My father was a minister for 50 years, I watched him make a difference in peoples' lives, and I think this is going to be one of those projects that makes a difference in peoples' lives," said Patriot Rail CEO John Fenton.
Officials hope that the rail district will help reduce supply chain shortages.
Action News is told the lease term is for 20 years, with potential renewals depending on decisions between Merced County and Patriot Rail.
Patriot Rail says it's aiming to be up and operational by May 1.