Z-Axis blocked on MMB movement
You seem to be referencing the cameras movement in the viewport accessible via  MMB, as said in your comment.


  Mr Zak, the Z axis is blocked only when rotating the viewport.


By default, the Viewport Orbit Style is set to Turntable. For  a less restrictive Orbit Style, set it to Trackball.


  [The Orbit style sets] how Blender works when you rotate the 3D View by default when holding  MMB.
  
  Turntable
  Rotates the view keeping the horizon horizontal.  
  
  This behaves like a potter’s wheel or record player where you have two axes of rotation available, and the world seems to have a better definition of what is “Up” and “Down” in it.
  
  The drawback to using the Turntable style is that you lose some flexibility when working with your objects. However, you gain the sense of “Up” and “Down” which can help if you are feeling disoriented.
  
  Trackball
  Is less restrictive, allowing any orientation.


Blender Manual

To set the Orbit style to Trackball, open the User Preferences window &#9096; Ctrl&#9095; AltU and go to the Input rider. Then click on the Trackball button.