removing upper part of a wall
Of course you can remove the upper part of that wall by:

Scoring the drywall on the finished side where you want the cut to be.
Removing the drywall from the top portion taking care not to pull off any below the score line.
Cutting the studs along that line and removing the top portion of each one.
Place some top plate on top of the remaining studs to tie them all together.

Ok, now you have done what you asked but your going to be left with a wobbly and weakly supported half-wall.  It was not designed or built to stand on its own and you will likely not be satisfied with it. I will say that I don't believe it's possible to secure a 2x4 wall by attaching only at the bottom.
Free standing half walls are usually deeper than a normal floor-to-ceiling wall and they are often secured through the floor and to the floor joists for stability.
I think your plan needs to be revisited.
What to do?  You need to somehow provide a secure anchor to keep the remaining