Magnussen was called in as a late replacement for Nikita Mazepin in the days prior to the final pre-season test little more than seven days ago.
The Dane showed impressively during his limited running last week as he got back up to speed with F1 machinery after more than a year away from the sport.
In qualifying, he arguably delivered the performance of the session to book a place comfortably inside the Top 10.
“It's crazy. This is all we ever could've hoped for – I'm speechless,” Magnussen said.
“The last couple of weeks have been insane. Getting here, learning about the car, seeing that it is maybe a pretty good one and being so anxious about this qualifying to really see how it is and then finding out it is really good.
“I got through to Q3 on one set of tires and in Q2 I only ran one set – I think I was P4 or something after the first run and ended up P7,” he said of his qualifying progress.
“Then we had some issue that needed more time to fix so we only got that one run again Q3 and still managed to get P7. It's just so cool and I can't wait to get started.”
A hydraulic issue with Magnussen's power steering late in Qualifying 2 threatened to derail the fairy-tale performance.
However, the Haas crew was able to resolve the issue in time for a final run.
“It was another exciting day for us again,” said team principal Guenther Steiner.
“We had a very good result, qualifying P7 and P12 is something we dreamt of at the end of last season and the beginning of this year
“Now we've done it, but I think there is more to come from us this year.”
Magnussen will line up seventh for the Bahrain Grand Prix, which gets underway at 02:00 AEDT on Sunday morning.