To "pull someone's leg" is an idiom that means to tease or joke with someone by telling them something that is untrue in a humorous or playful way. It is not meant maliciously, but as a friendly, light-hearted trick.
So, “You’re pulling my leg!” is another way of saying “I don’t believe what you’re saying” or “You must be joking!”.
The idiom has its origins in the criminal world of 18th and 19th century London. In those days street robbers often worked in gangs of two. One would trip up the unsuspecting victim and the other would remove his money and other valuables while he was lying on the ground. The robber didn’t literally pull the victim’s leg but caused him to stumble and fall and then lose his valuables.
- From online with editing
---------------------------------------------------------------------
Growing up, I was surrounded by some funny people, be it friends or relatives. But there was one particular joke that pulled my leg very hard:
I was about 4 or 5 years old, and one day asked my Mom a question in most young minds: "Where did I come from?". Mom gave me a quick answer: "I picked you up from a garbage can".
What?! I was in total shock: Ahhh, my Mom ain't my real mom? But who and where is my real Mom and why did she dump me? Being born an introvert, I didn't ask anymore, but the questions lingered and bothered me very much.
After a few days, Mom must have sensed that I had been quieter than normal and assured me that she is indeed my real Mom. But that was no use in my stubborn little mind and I refused to believe her for a long time.
So Hell No, never pull a young child's leg with a joke like that !
BTW, it looks like monkeys also pull each other's leg.