When Hamlet's father, King Hamlet, dies suddenly and unexpectedly, Hamlet comes home for the funeral. Close on the heels of the funeral—so close that Hamlet can darkly joke that Claudius uses leftovers from the funeral dinner for the wedding feast—Claudius and Gertrude marry. Already distressed by the shock of his father's death, Hamlet is doubly dismayed at this dizzyingly quick remarriage on his mother's part.
At this point, very early in the play, Hamlet has no idea that his uncle murdered his father. Encountering his father's ghost is the farthest thought from Hamlet's mind. He is simply appalled that his uncle is now his stepfather, in what seems to him a tastelessly hasty marriage.
Hamlet makes the comment "a little more than kin, and less than kind" as an aside when Claudius greets him as a "son." In saying this, Hamlet means that his uncle's relationship with his mother is now more than a filial or brotherly kinship.
"Kind" has two meanings: it means both "natural" and "compassionate." Shakespeare puns on both meanings: the relationship is both unnatural (it is incestuous, in that a former brother-in-law and sister-in-law are sleeping together) and lacking in compassion. He implies, in "less than kind," that perhaps Claudius pushed Gertrude into the marriage before she was ready in order to consolidate his hold on the throne. Essentially, even before meeting with the ghost, Hamlet is upset with his uncle.
Just prior to Hamlet's statement, the new king, Claudius, calls Hamlet "my cousin . . . and my son." Claudius is the brother of Hamlet's dead father, the former king, and though it has been fewer than two months since the old king's death, Claudius has married his brother's widow, Hamlet's mother, Gertrude. So, Claudius was, first, Hamlet's uncle, and he has since become Hamlet's stepfather. Aside from Hamlet's upset about the speed with which his mother remarried, he is upset at her choice of husbands (a relationship which he considers to be incestuous); according to Biblical law, Claudius became Gertrude's brother when she married his brother. Moreover, Hamlet doesn't seem to think particularly highly of Claudius anyway, and now the man is his relative, two times over: this double relation makes him "more than kin." Further, Claudius's taking of his brother's widow for his own wife seems to make him "less than kind": "kind" likely means "natural" as Shakespeare uses it in this way elsewhere. In other words, the king's behavior is unnatural, according to Biblical law, because he married his sister.
It isn't far into the second scene of Shakespeare's Hamlet that the reader will come upon one of the most famous lines not only from this play but also from all of Shakespeare's collected works. In fact, this line is one of the most common allusions to Shakespeare found in other works. Soon after Hamlet appears on stage, he looks to the side and declares with disgust, "A little more than kin, and less than kind." Hamlet is absolutely disgusted with his uncle Claudius who now, after marrying Hamlet's mother (Gertrude), has become Hamlet's "father." It is important to note the play on the words "kin" and "kind." The phrase relies on the double meanings of something being "natural" vs. something being "kind or nice." Let's take each of them in turn. Hamlet is asserting that Claudius is "more than kin." This means that where Claudius used to be a distant uncle, now he is (disgustingly) considering himself a second father to Hamlet due to Claudius's marriage to Gertrude. The irony here is that the term "more than kin" has a positive connotation, as if someone were saying you are "closer than family." However, Hamlet means the exact opposite in this case. The second aspect of this common allusion is the term "less than kind." The word "kind" can also mean family, as if we were to say "of one's own kind." Hamlet saying Claudius is "less than kind" can mean that Hamlet does not think of Claudius as part of the family and certainly not as his mother's husband. To complete the play on the word "kind," it can also mean that Claudius wasn't being nice (and certainly not kindly) when he took his brother's sister as his wife.