Opting to field after winning the toss, Railways rode on the 25-year-old Mali, who hails from Tezpur in Assam, to run through the Baroda line-up in their first innings.
This is Mali's best figures in first-class cricket, having made his debut in 2008. At stumps on the first day, Railways were 24 for one in 16 overs.
For Baroda, Aditya Waghmode made 33 while Yusuf Pathan and Murtuja Vahora contributed 32 each at the Moti Bagh Stadium.
Brief scores: Baroda 1st innings: 176 all out in 69 overs (Aditya Waghmode 33; Ranjitkumar Mali 8/45).
Photos: Salman Khan, Daisy Shah spotted at the Mumbai airport
Photos: Rakhi Sawant to play Honeypreet in Ram Rahim biopic
Photos: Arvind Kejriwal asks Kamal Haasan to join politics
Photos: TV actress who played goddesses on the small screen
Kareena Kapoor Khan looks in fab shape after weight loss! See photos