Barty has lost 6-7, 6-3, 6-4 to Sofia Kenin in Toronto, marking the American's first victory over a top-five WTA player.
"It just wasn't there today", Barty admitted.
"I think at times I was missing by big margins, which is not something that I'm very used to or comfortable with".
Estonian Kontaveit, seeded 19th, recovered from a set down to beat Russia's Maria Sharapova 4-6 6-3 6-4.
"It's been a nice doubles partnership that we've formed this year", Barty said of pairing with Azarenka. "It's not something that I worry about or focus on. Regardless of whether it's number 10, it's number 50, 200 or it's number one, it's just a number next to your name".
Millman needed more than two-and-a-half hours to battle past Spanish veteran Feliciano Lopez 6-7 (7-4) 7-6 (7-2) 6-3 in an enthralling match at the ATP Masters 1000 event.
Croatia's Donna Vekic also saved three match points on the way to a 3-6, 7-6 (7/5), 7-6 (7/5) win over American Madison Keys.
An all-Canadian first-round matchup featuring Indian Wells champion Bianca Andreescu and wildcard Eugenie Bouchard will open the evening session followed by a clash between seventh-seeded Sloane Stephens and Czech qualifier Marie Bouzkova.
It was Kenin's first win against a top five player, with the world number 28 complaining about the transition back to hardcourts after her success on clay at the French Open.
World number 29 Kenin failed to serve out the opening set at 5-4 but did not let that setback derail her, remaining poised the rest of the way even as Barty almost rallied back from big deficits in the second and third sets.
In Toronto, Kenin was up a break in the first set, but faltered while serving for the set, allowing Barty to take the tiebreak.
"With her you've gotta fight every point".
World No.29 Kenin almost squandered a 4-1 cushion in the decider but held her nerve and closed out the match when a misfiring Barty sent a routine forehand long.
Instead of that, Sofia found the new drive and broke again in game eight thanks to a forehand victor from the Aussie, forging another lead and holding at love with a forehand victor for a 6-3 and the deciding set.
Ashleigh Barty after losing in the first round of the Canadian Open. "But I've been preparing really well for the last couple weeks, and that preparation really showed tonight".
The 20-year-old will play either Dayana Yastremska - who beat British number one Johanna Konta on Monday - or Victoria Azarenka in the third round.
Kenin again seized the initiative, taking a 4-1 lead with two breaks of serve - Barty able to claw only one of them back.