The One and Only Ivan begins with Ivan, a silverback gorilla, introducing himself to the reader. Ivan lives in a glass-enclosed domain at the Exit 8 Big Top Mall and Video Arcade. Next to his domain lives Stella, an elderly circus elephant with a swollen, injured foot. Bob, a stray dog, secretly lives in Ivan's domain and sleeps on Ivan's chest. Ivan used to be wild but has lived in captivity, among humans, for twenty-seven years. Over time, Ivan learned to understand human speech, though he doesn't understand human behaviors and attitudes, particularly their greed.
Multiple times a day Mack, the mall's owner, dresses as a clown and leads the animals through performance routines for mall-goers. At night a girl named Julia, the mall cleaner George's daughter, does her homework and makes drawings while sitting next to Ivan's domain. Julia once gave Ivan a slip of paper and a crayon through a crack in his domain. Ever since then he has made drawings that Mack sells for twenty dollars a piece. When young and wild, Ivan painted with mud. Ivan claims to have a bad memory, but Stella believes he doesn't want to remember his past. Ivan draws a beetle but Mack doesn't see it as anything other than a blob: Julia, however, recognizes it as a beetle, and Ivan is happy to have a fellow artist around.
Mack buys Ruby, a baby elephant, to increase customer traffic. Stella is displeased by the new addition, as she remembers everything she has been through and doesn't want the same miserable life for Ruby. While more customers come to see Ruby, Stella's infected foot makes her overall health deteriorate, but Mack says he can't afford to call in a veterinarian. Stella asks Ivan to save Ruby, then Stella dies in the night.
To console Ruby, Ivan tells a story of his life growing up in a dense rainforest in central Africa. He played tag with his twin sister, who was named Tag. He played with mud, so he was named Mud. One day humans took him from his family and put him in a dark crate, which Mack opened. Mack and his wife Helen raised Ivan like a human in their house, making him wear diapers and drink soda and eat junk food. Helen left Mack one day, and Ivan grew too big for the house. Mack put Ivan in his domain at the mall. At first Ivan liked it, but he didn't realize how long he would have to stay there. He keeps track of days by marking Xs on the wall.
Following Stella's death, Mack drinks heavily and disappears for two days. When he returns, he attempts to train Ruby to perform the same routine Stella performed. He threatens her with a claw stick, causing her to smack him with her trunk. Julia gives Ivan three pots of finger paints. Using the paints, Ivan takes Ruby's fate into his hands and begins making paintings at night. One morning Mack finds the paintings stashed under Ivan's plastic paddling pool and decides he can sell them for more than he was selling Ivan's crayon drawings. It disappoints Ivan that Mack took Ruby's paintings, but Mack brings Ivan more paint and paper. Ivan realizes he needs to paint the zoo he sees in a TV advertisement. But it is not enough: he realizes he needs to spell the word home.
One evening Ivan sticks the paintings through the crack in his cage. Julia and her father don't understand that the paintings are a set and so they pile them up and intend to drop them by Mack's office. Ivan hoots and beats his chest to get their attention, startling them. Julia sees that the dropped paintings on the floor create a bigger picture, and she notices an H. After some convincing, George helps Julia put Ivan's paintings up on the freeway billboard advertising Ivan and Ruby.
The billboard brings media attention and more customers. Soon protesters arrive at the mall, which eventually leads to visits from animal welfare officials who shut down Mack's enterprise. Zoo officials arrive with transport boxes to take Ivan and Ruby to the zoo. While they are both reluctant to leave their familiar environment, eventually they go in the boxes.
Ivan wakes up in a new glass cage. He doesn't understand where he is, but soon it becomes apparent that he is being integrated into the gorilla pasture at the zoo. After first seeing his new troop on a TV, and later through the glass, Ivan slowly adjusts to living as a gorilla among other gorillas. One day Ivan makes a mud painting on a large white wall. After climbing a tree to see his work better, he sees Ruby over the wall, and she is happily living with other elephants.
The novel ends with Julia and her father visiting Ivan at the zoo. Julia has Bob in her backpack, and she says he lives with her now. They say goodbye and Ivan turns to his troop, proud to be a mighty silverback.