No, that doesn't void the warranty. However you should reinstall the original storage and backup any personal files before sending any computers in for warranty. PC manufacturers may replace storage or the entire machine at their discretion so you don't want your drive to be in it if they do.
Note that if you damage the machine while installing a new drive then yes you would void your warranty. So don't force anything. Also, some machines from some manufacturers have a warranty void sticker. While technically not legally enforceable the manufacturer will give you a hard time if you break those.