They're both grammatically correct.
Your medical history is a detailed list of your past and current ailments, treatments, conditions, and medication along with any family history of related diseases, plus all your other personal details, including vital stats, gender, weight, etc.
Your medical records will include that history, along with any test results, lab readings, x-rays, diagnostic images, etc.
Most of the history you provide when you fill out forms during an initial doctor's visit. The records generally accumulate in your file as they're ordered by various doctors.
Most people don't carry their complete medical records with them, although a few do. At least in the US, you have the right to obtain a copy of them, but for the sake of convenience, most people just have them transferred from doctor to doctor when necessary.
Inevitably though, any time you visit a new doctor or specialist, you'll have to fill out at least a minimal medical history.
That being said, I wouldn't be surprised if some people considered the two terms synonymous. The distinction is probably moot to the average person.