Play video content Exclusive TMZ.com

Amber Portwood's ex-fiance says she's a loving mom who would never put her kids in harm's way ... and he's not buying her as a machete-wielding maniac.

Matt Baier -- who was engaged to Amber before they split in 2017 -- tells TMZ ... her domestic violence case doesn't add up to him, and he wants to hear her side of the story.

Amber's ex admits they had some "legendary arguments" when they were together, but says she never got violent with him ... even when she was in her most heated moments.

He adds that she was nothing but a wonderful mother during their time together ... so it's hard for him to believe she'd do something dangerous around her 1-year-old son, James.

We broke the story ... Amber was arrested for domestic battery on July 5 after her boyfriend, Andrew Glennon, contacted police and claimed she struck him with a shoe while he was holding their boy.

We later learned she also allegedly struck a door with a machete while Andrew was on the other side of it.

Baier thinks that allegation is fishy, and speculates there's more to the altercation people don't know ... suggesting it couldn't have just been a fight over fireworks, as some outlets have reported.

Play video content TMZ.com

As we told you, Amber was in court last week to face the 3 felony charges against her and attend a hearing about custody of her son. Andrew filed for sole custody after her arrest, and a judge slapped Portwood with a temporary restraining order.

Interestingly, another ex and baby daddy of Amber's, Gary Shirley, was at the courthouse with his wife to show her support.