The military history of New Zealand during World War I began in August 1914. When Britain declared war on Germany at the start of the First World War, the New Zealand Government followed without hesitation, despite its geographic isolation and small population. It was believed at the time that any declaration of war by the United Kingdom automatically included New Zealand; and the Governor (the Earl of Liverpool) announced that New Zealand was at war with Germany from the steps of Parliament on 5 August.

The total number of New Zealander troops and nurses to serve overseas in 1914–18, excluding those in British and other Dominion forces, was 100,471, from a population of just over a million. Forty-two percent of men of military age served in the New Zealand Expeditionary Force, fighting in the Gallipoli campaign and on the Western Front. 16,697 New Zealanders were killed and 41,317 were wounded during the war – a 58 percent casualty rate. Approximately a further thousand men died within five years of the war's end, as a result of injuries sustained, and 507 died while training in New Zealand between 1914 and 1918.

The First World War saw Māori soldiers serve for the first time in a major conflict with the New Zealand Army (although a number had fought in the Second Boer War when New Zealand recruiters chose to ignore British military policy of the time of disallowing 'native' soldiers). A contingent took part in the Gallipoli campaign, and later served with distinction on the Western Front as part of the New Zealand (Māori) Pioneer Battalion. 2,227 Māori and 500 Pasifika, including 150 Niueans, served with New Zealand forces in total.

Outbreak of the war On 30 July 1914, the British Admiralty informed Captain Herbert Marshall, the senior naval officer in New Zealand, by telegram that a war in Europe was likely. This followed the declaration of war made by Austria-Hungary against Serbia, the news of which threatened to bring Russia, and her allies, Britain and France, into the conflict. A War Council, which included Marshall, Prime Minister William Massey, and Major General Alexander Godley, the commandant of the New Zealand Military Forces, was formed. This authorised the commencement of certain mobilisation and defensive procedures. These included implementing inspections of incoming vessels at the four major ports, mobilisation of the garrison artillery to man the various forts around the country, and commencement of censorship. Radio stations and the sites where undersea telegraph cables came on shore were placed under guard. The cruiser HMS Philomel, on a training voyage in the Cook Strait was recalled and made ready for war, such as it could be given its rundown state. The country's small Royal Naval Reserve was called up on 2 August to help crew the cruiser.

The conflict in Europe escalated in the following days when Germany declared war on Russia and then on 4 August invaded Belgium. This brought France and Britain into the war in support of Belgium. The outbreak of World War I was announced in the afternoon of 5 August by the Governor of New Zealand, Lord Liverpool, when he read out aloud the telegram dispatched by the Colonial Office confirming the commencement of hostilities to a crowd of 15,000 people gathered outside the old Parliament Building in Wellington. Although a self-governing Dominion, such were New Zealand's ties to Great Britain as part of the British Empire it was inherently understood that the country was automatically at war as well. Massey, speaking to the crowd after Lord Liverpool's proclamation of war, urged his fellow citizens to "keep cool, stand fast, do your duty to your country and your Empire".

There was bi-partisan support in Parliament for its position in standing alongside Great Britain and its Dominions; both Massey's Reform government and its Liberal opposition made strong expressions of support. The leader of the Liberal Party, Joseph Ward, made it clear that the British Empire could not be uninvolved in any fighting against the Central Powers. The general population, at least 20% of whom were born in Great Britain, also demonstrated keen patriotism and an appreciation that New Zealand needed to play a role in the ensuing conflict. As the news of the war spread, crowds gathered at central points in major cities and marched and cheered in support of Britain and her allies. However, the indigenous people of New Zealand, the Māori, had a more muted reaction; not having the same links to Great Britain, they were only a small proportion of the population and were not a part of mainstream society.

Prior to the official declaration of war, the New Zealand government had offered, on 31 July, to provide an expeditionary force to the British government; this followed a similar offer made by Canada. Initially advised that this would not be required, New Zealand's offer was subsequently accepted on 7 August.

The first New Zealander to be killed while on military deployment in World War I was John 'Rosy' Reardon, from Kaikoura. Reardon was a 23 year-old sailor of the newly-formed Royal Australian Navy, and was aboard the submarine HMAS AE1 when it sank on 14 September 1914.

Samoa

On 6 August 1914, the British government requested New Zealand seize the wireless station on the island of Upolu, part of Imperial Germany's protectorate of German Samoa, deeming it "a great and urgent Imperial service." Therefore, a body of personnel was organised for service in Samoa. A mixed force of 1,374 men, mostly drawn from the Territorial Force and known as the Samoan Expeditionary Force (SEF) under the command of Colonel Robert Logan, plus six nursing sisters, sailed from New Zealand on 15 August.

The transport ships were escorted by the cruisers HMS Psyche and HMS Philomel. To help allay concerns about the possibility of being intercepted by the German East Asiatic Squadron, the convoy was joined by HMAS Australia and the French cruiser Montcalm at Noumea. After stopping in Fiji to collect some guides and interpreters, the New Zealanders arrived at Apia on 29 August.

Germany refused to officially surrender the islands but with only a minimal military presence, there was little prospect for meaningful resistance. The Governor of German Samoa, Erich Schultz, sent a message from the island's radio station that no resistance would be offered. The New Zealanders proceeded to land at Apia and seized key buildings and facilities without interference. The only opposition encountered was at the radio station, where the equipment was sabotaged by the German operators. Logan officially declared German Samoa to be under the control of New Zealand the following day, 30 August, in a ceremony at the courthouse in Apia.

When Vizeadmiral (Vice Admiral) Maximilian von Spee, commander of the East Asiatic Squadron, learned of the occupation, he hastened to Samoa with the armoured cruisers SMS Scharnhorst and SMS Gneisenau. Arriving at Apia on 14 September, the approach of the German ships was observed and the New Zealanders prepared to defend themselves. However, von Spee and his ships soon departed for Tahiti, with neither side opening fire. The SEF remained in Samoa until March 1915 at which time it began returning to New Zealand, a process completed by the following month. New Zealand Expeditionary Force

It had been envisaged for a number of years that New Zealand would contribute an expeditionary force to serve in any conflict involving the British Empire and plans for raising it had been in place for some time. In the years prior to the outbreak of the war, Godley coordinated plans with his counterpart in Australia for the purpose of making a joint contribution to an expeditionary force. The most likely use of this expeditionary force was envisaged to be in Europe against Germany, which Godley assessed as being the most likely opponent in any hostilities.

Once the declaration of war was made, Massey officially offered what would be known as the New Zealand Expeditionary Force (NZEF) to the British government, which accepted on 12 August. To form the basis of the NZEF, Massey had wanted to call up men of the Territorial Force but was advised that this was only possible for active service in New Zealand. In any event, it proved unnecessary as men of the Territorial Force came forward on a voluntary basis in large numbers and furthermore, the public response to the call for volunteers for the NZEF was immediate and enthusiastic. By 12 August, around 14,000 men had come forward; Massey had hoped for around 7,000 to 8,000.

Mobilisation for the NZEF actually commenced before the war for, on 31 July 1914, the four military districts started tentative and discrete preparations, anticipating a formal declaration of war. Volunteers had to be of at least 20 years of age and pass a strict medical examination. This meant that many soldiers of the Territorial Force were excluded on account of either their age or their health. Mobilisation plans called for each infantry battalion of the Territorial Force to provide a company for the NZEF while the various mounted infantry regiments would provide a squadron. This would result in an infantry brigade of four battalions and a mounted rifles brigade with three regiments. There would be a surplus regiment of mounted rifle regiment and also supporting units of artillery, engineers and field ambulances.

Volunteers who passed their medical examination proceeded to mobilisation camps established in Auckland, Palmerston North, Christchurch and Dunedin, for training. Those not already in the Territorial Force were fitted out with kit and equipment. The raising of the NZEF proceeded so satisfactorily that Massey was able to advise the British government that it could leave New Zealand by 27 August although more time would be preferable. Ultimately, the main body of the NZEF, under the command of Godley, departed New Zealand on 16 October after an earlier attempt to leave was abandoned following the assessment of the risk of interception by the German East Asiatic Squadron. When it left, the main body numbered 8,574 men, spread across ten troopships, as well as over 3,800 horses, ten million rounds of ammunition and 6,000 rounds of artillery shells.

Middle East Following its departure from Wellington, the convoy transporting the NZEF steamed to Western Australia where it linked up with the troopships carrying the Australian Imperial Force (AIF). There was still concerns regarding the vulnerability of the troop transports to attack by the German East Asia Squadron so the convoy included an escort of three cruisers, , , and , as well as the Japanese battlecruiser Ibuki. Together with their escorting warships, the convoy, now numbering 37 transports, sailed to Alexandria via Colombo and the Suez Canal. During the voyage, they were fortunate to have avoided which was near the Cocos Islands at the same time the convoy was transiting the area. It had been intended that the NZEF and AIF would be landed in Europe. However, following the entry of the Ottoman Empire into World War I on the side of the Central Powers, there was now a security threat to the Suez Canal. The New Zealanders and Australians were instead disembarked in Egypt to defend the Suez Canal against an attack.