It is not true.

"Alas, Einsteinâ€™s childhood offers history many savory ironies, but this is not one of them. In 1935, a rabbi in Princeton showed him a clipping of the Ripleyâ€™s column with the headline â€śGreatest living mathematician failed in mathematics.â€ť Einstein laughed. â€śI never failed in mathematics,â€ť he replied, correctly. â€śBefore I was fifteen I had mastered differential and integral calculus.â€ť In primary school, he was at the top of his class and â€śfar above the school requirementsâ€ť in math. By age 12, his sister recalled, â€śhe already had a predilection for solving complicated problems in applied arithmetic,â€ť and he decided to see if he could jump ahead by learning geometry and algebra on his own. His parents bought him the textbooks in advance so that he could master them over summer vacation. Not only did he learn the proofs in the books, he also tackled the new theories by trying to prove them on his own. He even came up on his own with a way to prove the Pythagorean theory."