All-rounder Ibrahim, 16 years and 299 days, moved from 37 overnight to 55 in Sussex’s first-innings 313 before lunch.
Malan, in his first county appearance of the summer, then steered Yorkshire’s reply of 272 for two from 74 overs. Gary Ballance also made 74 not out.
Ibrahim is one of six English 16-year-olds to score fifties in first-class in this country, but only him and Bilal Shafayat have achieved the feat in the Championship.
Ben Coad claimed two of five Sussex wickets to fall in the morning as they advanced from 267 for five, getting Ben Brown caught behind for 127 and Ibrahim caught at third slip.
Steve Patterson and David Willey also struck, while Willey wrapped up the innings with a superb direct hit run out of Jamie Atkins from mid-off at the non-striker’s end.
Adam Lyth pulled the second legitimate ball of the reply, from Henry Crocombe, for six as Yorkshire faced six overs before lunch.
Lyth and Tom Kohler-Cadmore shared an opening partnership of 83 inside 18 overs, their second highest stand of the season.
Ibrahim’s seamers made the breakthrough when trapping Kohler-Cadmore lbw for 25 in the first half of the afternoon, continuing the youngster’s memorable day.
Lyth lost his leg stump to Atkins for 48 three overs later as Yorkshire fell to 95 for two in excellent batting conditions.
Shafayat was 16 and 360 days when he scored 72 for Nottinghamshire v Middlesex in 2001.
Ibrahim, 61 days his junior, reached 50 off 114 balls courtesy of an overthrown second run. His composure was the main attribute in a 134-ball innings with eight fours.
Composure is something Yorkshire’s batting has largely lacked this season, but the inclusion of Malan and Ballance following recent unavailability and injury changed that against an inexperienced attack.
England T20 star Malan has been at the IPL and missed last week’s Roses defeat for personal reasons.
Aside from being dropped at first slip on 27 by Travis Head just before tea, he looked untroubled. Ballance was more circumspect on his return from a calf injury, facing 180 balls.
They shared an unbroken 177 partnership for the third wicket, with Malan reaching his century off 153 balls in the day’s final over.
Ibrahim said: “I was shocked on Sunday when I was told I was playing, but I was so excited. There are not many better grounds than Headingley on which to make a debut, and it was just so special to be out there when Ben Brown made his century.
“It was tough to bat against the new ball, but Browny helped me though and took the pressure off me. I found it tough, but I just had to keep battling though and do the best I could. It was very special to beat the record (youngest fifty maker in Championship history).
“Matt Prior (who capped him on day one) told me I should be here and learn, that it was early in my journey and there was still a long way to go. I’ll certainly be staying at school and taking things how they come.”