The 26-year-old has made 52 appearances for the Hatters since arriving at Kenilworth Road in May 2021 and helped Town to Premier League promotion last season.
Onyedinma has scored three goals across two seasons for the Hatters, including a dream debut against Peterborough United, bagging a goal and two assists.
Rotherham finished 19th in the Championship last season and we recently signed Chieo Ogbene from the Millers earlier in the summer.
We wish you all the best at the New York Stadium next season, Fred!