As explained by Maslow, people are initially motivated by the needs at the lowest level of need hierarchy. Unless this need is satisfied to a reasonable degree, they are not very much concerned with satisfaction of higher level need but when a lower level need is satisfied then they want to satisfy the needs at the next higher levels. Thus, unless physiological level needs are met a person will not be very much interested in higher level needs. When the physiological needs are met then the person will move to the higher level of need seeking security. At this stage the person is no longer motivated by Psychological need. In this way the person may pass serially through the stages of being motivated by safety, social and esteem needs to the self-actualization need.
The McGregor's theory X and Y are actually two sets of alternate assumptions about motivation of people. Theory X represents assumptions that many managers hold but which are not true. Theory Y represents assumptions that represent the reality as per McGregor.
On face of it there is very little in common between Maslow's theory of hierarchy of needs and McGregor's Theory X and Theory Y.
But when by looking beyond the obvious meanings, it becomes clear that the Theory X of McGregor is describing characteristics of a person who is still at the level of fist two need in the Maslow's hierarchy of need. In comparison the Theory Y represents people who have advanced to the third, fourth and fifth level of Maslow's hierarchy.
Thus, though McGregor makes no mention of alternative types of need, he does realize the potential of all people to aspire to higher level of motivation. To this extent the Maslow and McGregor are thinking alike. However, unlike Maslow, McGregor does not