The first issue is that anything plugged into a USB port is going to be seen as a bootable device and the PC will try to boot from it. I have that same problem with an HP laptop and the ONLY solution that works is to have nothing other than mouse and keyboard plugged into the USB ports when the laptop boots.
Is the SSD a SATA SSD connected through a cable? Or is it an M.2 SSD connected directly to the motherboard?
If the first, then when you want to connect a second SATA drive, switch the connectors and see if the problem continues.
***If my post helped, click the White thumbs-up symbol to say thanks***
***Please mark Accept As Solution if my post solved your problem***
I am a volunteer and I do not work for, nor represent, HP
First of all, thank you very kindly for the response. I appreciate you taking the time!
I finally concluded that you're right - this machine will NOT boot with USB devices connected. Despite turning off the "boot from USB device" option in the BIOS, the machine insists on checking the USB devices, and when it finds one, it just locks.
The SSD was an aftermarket one that I installed internally (replacing the original 500 GB conventional drive).
I tried swapping all SATA connectors without any result other than the machine then refused to boot at all, giving me a "This is not a bootable disc" error. The internal SSD must be connected to the dark-blue SATA controller, or the machine won't boot from it at all.
I finally solved the problem entirely. I hooked up the external HDD to my MacBook Pro and I'm selling the HP desktop. Problem solved.
Thanks again for your generous feedback - I appreciate it and it did help!