Deleting the underlying object of a shared pointer manually leads to undefined behavior. Shared pointers assume exclusive ownership of the object and are responsible for deallocating the memory. Manually deleting the object bypasses the shared pointer's memory management, potentially causing double deletion or memory leaks.