this refers to a person who does something seemingly irrational, pointless, stupid, fucked up, unthinkable (like the thought would never ever cross your mind), etc. in an attempt to solve a problem, complete a task, etc. Then, that person accomplishes said problem or task by their unorthodox solution and leaves others astonished that the idea worked. It is at this time someone would say this simile.
Jake had to put away the pool chairs, so to minimize the number of trips, he used a soda cooler with wheels to cart many chairs. He did this by balancing a chair on the edges of the open-topped cooler, then stacking the other chairs on that one. This plan seemed bound to fail, but when he succeeded some one said, "he's like a beautiful mind."