That time coincided with the outbreak of war with France in February 1793. Lacking any influence or naval contacts himself, Dixon Hoste asked his landlord, Thomas Coke, for assistance and was introduced to Nelson, then living nearby in Burnham Thorpe, who had recently been appointed as Captain of HMS Agamemnon a 64-gun Third-rate, which was being fitted out at Chatham Dockyard.
He moved with Nelson to HMS Captain in 1796 and was with him at the Battle of Cape St Vincent. In 1797 he fought in the Battle of Tenerife, in which Nelson lost his arm. Following the death of a Lieutenant Weatherhead in the battle, Nelson promoted William to Lieutenant to fill the vacancy, his position being confirmed, thanks to his 'book time' in Europa, in February 1798.
Later that year William was aboard HMS Theseus a 74-gun third-rate at the Battle of the Nile, under Captain R.W. Miller. Following the battle Nelson sent his report to London, taking the precaution of sending a duplicate in the brig HMS Mutine, commanded by Thomas Capel. At Naples Captain Capel was to carry on with the dispatch, handing command of Mutine to Hoste. Upon taking command William would become an acting Captain, at the age of 18. Rejoining the fleet off Cadiz, his promotion was confirmed in December 1798.
Hoste continued in command of the Mutine for the next 3 years, at first under Nelson and later under Lord Keith, who knew little of him. His career appeared to have stalled until, possibly at Nelson's prompting, he was promoted Post-Captain by Lord St Vincent, First Lord of the Admiralty, in January 1802.
At this time William was in Alexandria, where he contracted malaria and then a lung infection, which were to have a lasting effect on his health. He convalesced with Lord and Lady Elgin in Athens, where he began an education in classical antiquity, completed following his appointment to the frigate HMS Greyhound in Florence, when his ship was cruising on the Italian coast. At the end of 1804 he was given the command of HMS Eurydice, which cruised the African coast, following which he returned to England and then to the Mediterranean.
A number of successes while engaged on active service in the Mediterranean over the following 18 months brought Hoste to the attention of Lord Collingwood, who rewarded him with a cruise in the Adriatic Sea. Here he conducted an aggressive campaign, bringing coastal trade with the enemy more or less to a halt, and by the end of 1809 capturing or sinking over 200 enemy ships.
Now commanding a small detachment of frigates, comprising Amphion, Active (36 guns) and HMS Cerberus (32 guns), operations continued and in March and April 1810 alone they took or destroyed 46 vessels. On 13 March 1811 a Franco-Venetian squadron, under the command of an aggressive frigate commander named Bernard Dubourdieu, attacked Hoste's small force of four frigates near the island of Lissa (now called Vis), in what became known as the Battle of Lissa.
Dubourdieu's squadron of 7 frigates and 4 smaller warships possessing a total of 276 guns and nearly 2,000 men significantly outnumbered Hoste with his 4 frigates mounting only 124 guns and manned by less than 900 men. The French officer imitated Nelson's attack at Trafalgar by sailing down on the English line from windward with his ships in two lines. However, flying the signal 'Remember Nelson' to rally his men, Hoste's superior seamanship and gunnery overcame the larger enemy force, with the loss of 50 men killed and 132 wounded. Dubourdieu was killed, one of the French frigates was driven on shore, and two of the Venetians were taken. A small island in the entrance to the bay of Vis town is named Hoste Island after him, while the Sir William Hoste Cricket Club in Vis was founded by the Croatian islanders after learning that he had organised the game there during the British occupation of the island.
Amphion was so badly damaged that she was obliged to return to England, where Hoste was given the command of HMS Bacchante (38 guns), although he did not return to the Adriatic in her until 1812. Hoste continued to demonstrate the same kind of initiative and aggression as before. Working jointly with Montenegran forces he attacked the mountain fortress of Cattaro, hauling ships' cannon and mortars to positions above the fort using block and tackle. The French garrison had no alternative but to surrender, which it did on 5 January 1814. Hoste immediately repeated these tactics at Ragusa (now Dubrovnik), which also surrendered. These actions have been imortalised in fiction, where they are attributed to Captain Jack Aubrey, the principal character in Patrick O'Brian's 20 novels of the Aubrey–Maturin series.
Hoste's health, compromised by his malaria and earlier lung infection, now became worse and he was forced to return to England. In 1814 he was made a Baronet, and in 1815 he was knighted KCB. In 1817 he married Lady Harriet Walpole, with whom he had three sons and three daughters. In 1825 he was appointed to the royal yacht Royal Sovereign. In January 1828 he developed a cold which affected his already weakened lungs, and he died of tuberculosis in London on 6 December 1828. He was buried in St John's Chapel, London.
A noted pub and restaurant in Burnham Market is called the Hoste Arms, either in honour of him, or of his family who were significant landholders in the area.