The transportation company reported $1.1 billion net income, or $2.37 per diluted share, up 13% on the June quarter last year.
Despite lower car loadings, operating revenue increased 5% in its 2013 second quarter to $5.5 billion versus $5.2 billion in Q2 2012, UP announced on Thursday.
Declining volumes in agricultural products and intermodal shipments more than offset growth in chemicals and automotive shipments.
Volumes for industrial products and coal shipments were flat versus 2012.
Revenue from hauling coal increased 12% to $975 million on volume that was little changed, the company said.
"Union Pacific achieved record financial milestones this quarter," UP chief executive officer Jack Koraleski said.
"We managed our network efficiently and continued to show the agility of our strong franchise.
“When combined with solid core pricing gains, we more than offset the slight shortfall in volumes to generate best-ever quarterly earnings and operating ratio performance."
UP's operating ratio of 65.7% was a quarterly record, 1.3 points better than Q2 2012 and 0.9 points better than the previous best-ever quarterly result set in Q3 2012.
"As we move into the second half of the year, the economic outlook remains uncertain but we're hopeful that we'll see some economic improvement in the months ahead," Koraleski said.
"Union Pacific is well positioned with our diverse franchise and strong value proposition.
“We'll continue focusing on reinvestible pricing; attracting new profitable growth opportunities; and running a safe, efficient and reliable network that generates greater value for both our customers and shareholders going forward."
The company said it repurchased nearly 3.1 million shares in Q2 2013 at an average share price of $151.42 and an aggregate cost of $463 million.
Rival CSX reported a 4.5% earnings growth on Tuesday.