The Ministry of magic would have detected that magic was performed at Number 4, Privet Drive. This is based on Harry's conversation with Albus Dumbledore.
“But how come the Ministry didn’t realize that Voldemort had done all that to Morfin?” Harry asked angrily “He was underage at the time, wasn’t he? I thought they could detect underage magic!”
“You are quite right — they can detect magic, but not the perpetrator: You will remember that you were blamed by the Ministry for the Hover Charm that was, in fact, cast by —”
“Dobby,” growled Harry; this injustice still rankled. “So if you’re underage and you do magic inside an adult witch or wizard’s house, the Ministry won’t know?”
“They will certainly be unable to tell who performed the magic,” said Dumbledore, smiling slightly at the look of great indignation on Harrys face. “They rely on witch and wizard parents to enforce their offspring’s obedience while within their walls.”
Harry Potter and the Half-Blood Prince, Chapter 17, A Sluggish Memory
Based on this we can assume that Ministry knows that magic was performed at Number 4, Privet Drive and they (Ministry) cannot detect who performed the magic. And since this matter was not raised during Harry's disciplinary hearing, we can come to one of the following conclusion.
1. Ministry was informed:
May be Dumbledore or somebody else from the Order of the Phoenix had informed the Ministry after moving Harry to Headquarters of the Order of the Phoenix.
2. Ministry decided to let it go:
Ministry of magic does not enforce the rule strictly. Harry was not suspended for blowing up Marjorie Dursley.
“I - not - I haven’t got time to listen to house-elves! Anyway, that’s not the only - he blew up his aunt, for God’s sake!” Fudge shouted, banging his fist on the judge’s bench and upsetting a bottle of ink.
“And you very kindly did not press charges on that occasion, accepting, I presume, that even the best wizards cannot always control their emotions,” said Dumbledore calmly, as Fudge attempted to scrub the ink off his notes.
Harry Potter and the Order of the Phoenix, Chapter 8, The Hearing
Since Cornelius Fudge was desperate to get Harry expelled. I find it hard to believe that he did not rake up the issue of magic being performed in Number 4, Privet Drive.
“The Ministry does not have the power to expel Hogwarts students, Cornelius, as I reminded you on the night of the second of August,” said Dumbledore. “Nor does it have the right to confiscate wands until charges have been successfully proven; again, as I reminded you on the night of the second of August. In your admirable haste to ensure that the law is upheld, you appear, inadvertently I am sure, to have overlooked a few laws yourself.”
“Laws can be changed,” said Fudge savagely.
Harry Potter and the Order of the Phoenix, Chapter 8, The Hearing
So logically speaking somebody from the Order of the Phoenix had informed Ministry of magic.