The firm was appointed following a competitive pitch, and assumes the brief from incumbent Brahm PR.
It is understood the appointment was made earlier this week following a review of the National Express Group-owned operator's consumer and trade PR brief.
Communications manager Emma Knight said the decision to review the account came in May when the operator's contract with Brahms expired.
She said Brahms did not take part in the review as Midland Mainline was 'looking for something new'.
'We looked to NP PR as it has offices in Leeds, Manchester, Newcastle and London, which mirrors our service and enables the agency to provide support in the regions,' she said.
Knight added that the firm is hoping NP PR will be able to generate local coverage by working with train stations in the regions.
NP PR managing director Nick Brown confirmed the agency had been appointed, but would not disclose details of the brief.
It is understood the agency will report to Midland Mainline head of communications Kevin Johnson, and provide general support to the in-house PR team.
In February Midland Mainline ordered 23 high-speed trains at a cost of £160m to run between South Yorkshire, the Midlands and London, creating 210 jobs in the rail construction industry.
The purchase is part of an investment plan that includes the opening of a customer service 'academy' and the spending of £220m on the redevelopment of stations.