Near the end of the novel, Mr. Darcy explains his "grumpy" behavior:
"As a child ...I was not taught to correct my temper. I was given good principles but left to follow them in pride and conceit."
He notes that as an only son, he was
"spoilt by my parents...allowed, encourage, almost taught to be selfish and overbearing; to care for none beyond my family circle...."
He also says in the same passage that his parents taught him to look down on other people and see them as lesser beings.
In the novel, his behavior is called "proud." Essentially, Mr. Darcy blames his parents and his upbringing for his social failings, while at the same time insisting his mother and father didn't mean to make him that way. His wealth and social status also contribute to his grumpiness: he is used to everyone catering to his every whim and flattering him. After a while, as in the case of Miss Bingley, it begins to get on his nerves very badly. Part of his attraction to Elizabeth stems from the fact that she won't, to use a common phrase, "suck up" to him like almost everybody else does. He respects her for it, and is a little shocked at her daring.