In Chapter 2 of F. Scott Fitzgerald's The Great Gatsby, Nick Carraway has been invited into New York City with Tom Buchanan to meet Tom's mistress, Myrtle Wilson. The couple also throws a fairly wild party in their cramped apartment. Towards the middle of the chapter, Nick states he wants to leave the party and walk in the park "through the soft twilight," but whenever he tries to leave, one of the party guests pulls him back into the party for another "wild strident argument." It is at this point that Nick makes the observation, "I was within and without, simultaneously enchanted and repelled by the inexhaustible variety of life."
One reason why he feels both attached and unattached to the party is because he is drunk and has only been drunk one other time in his life, and drunkenness, of course, makes one's mind feel unattached in that it makes one lose a sense of reality. But the greater reason for his feelings of both attachment and non-attachment has to do with the actual people he is surrounded by.
There is a great deal of evidence that all of the party guests are very worldly people with very loose morals. Their worldliness is displayed in the profuse compliments they exchange with each other about their clothing and other worldly possessions. Their lack of morals is portrayed in their lies and discussions of affairs and divorces as if neither one is a big deal. As Nick explains, he couldn't help feel drawn in by their obsession with wealth and worldly goods, but at the same time, he also felt repulsed by their lack of morals, which is why Nick says he felt like he was both inside and outside of the party at the same time.