Max is a very big boy who is a slow learner, and Kevin is a brilliant little boy who has Morquio Syndrome, a dangerous form of dwarfism. The two develop a close friendship, and spend time together with Kevin riding up on Max's shoulders. With Kevin guiding, Max carries his small friend all over town, and the two go on imaginary quests, pretending they are knights looking for "dragons". When school starts, Kevin's mother and Max's grandparents arrange for them to be in the same special education class. Max helps Kevin get around, and Kevin helps Max learn to read.
Max's father is a notorious criminal who is serving time in prison. On the day Max learns his dad, Kenny, will be released on parole, Kevin has a seizure in the school cafeteria, but recovers after a short hospital stay. On Christmas Eve, Kenny kidnaps Max from his home. He ties Max up and leaves him in an abandoned building while he looks for a car. A woman named Loretta tries to help Max escape, but Kenny, who killed Max's mother many years ago, returns, and begins choking both Loretta and then Max. Suddenly Kevin shows up with a squirt gun which he claims is filled with acid. The solution is not really acid, but it is caustic; Max is able to escape, and Kenny is arrested and sent back to prison.
Kevin has another seizure on his birthday, goes to the hospital, and eventually dies. Max is distraught and withdraws from the world for a time, but after about a year, he is inspired by a dictionary Kevin had made for him to write the story about their adventures and friendship. That story is this book, Freak the Mighty.
You can find a much more comprehensive summary of the book at the link referenced below.